Is there a way to display a wait cursor while using the UltraGrid in LoadOnDemand?
Hello Edward,
I`m not sure that I understand well scenario, but if you set the LoadStyle to LoadOnDemand you will improve load time if the data source has lots of rows. LoadOnDemand delays creation of UltraGridRow objects until they are needed. Could you please give us more details about your scenario and final goals. About the cursor, you could change it using the property
ultraGrid1.Cursor =Cursors.WaitCursor;
Please let me know if you think that I misunderstand your request or if you have any further questions.
Regards
Correct, if you use LoadOnDemand to only load the data that needs to be displayed, the improves load time. However, I'm using the Grid to display data from a WebService. The web service may take 5 seconds on a high speed connection in order to retrieve all the data that needs to be shown at the time. During these 5 seconds, I would like to display a WaitCursor. There doesn't appear to be an event that gets fired from the Grid before loading data that needs to be displayed at which point I could set the WaitCursor.
Hi,
There's no way to do this. The whole point of OnDemand is that the grid loads data as it is needed. So there is no beginning or end point where the data begins or finishes loading. It's an ongoing process.
Is there a better method to use in order to load data in this situation? Imagine a data table that has thousands of rows and 20+ columns of data. Getting a single cell at each spot may take a 50-100 ms a piece. What is the best way to display this data such that the user has some indicator that it is loading data? It seemed that OnDemand was perfect for this situation with the exception that there isn't an opportunity to inform the user that some background processing is taking place.
Hi Edward,
Typically, when you use OnDemand mode, the loading of the data is very fast. That's the point of loading the data in smaller pieces instead of all at once, so that each piece is very quick and the user will not notice any delay. Usually, this means one row of data at a time, but I have seen cases where the app will load the data in chunks like 50 rows at a time and it's pretty fast.
How much data are you loading that it's taking long enough for the user to notice it?
The problem isn't so much the amount of data, but where the data is being loaded from. I am loading the data on demand using a web service. Depending on the connection speed, we are talking about a 10-20 second lag time to get the amount of data required to display a page (screen) of the grid.
Wow, that's a big delay. It seems like maybe what you need to do implement some sort of paging system and load the data one page a time. The grid doesn't have any support for paging, but you could implement something yourself by simply binding the grid to a single page of data and giving the user navigation buttons.
It doesn't seem like OnDemand mode is right for your situation.