Is there some way to display a progress or wait message while data is loading into a grid? I saw that there is a UseWaitCursor, but that did not seem to work as it always used the wait cursor even if data was not loading.
Thanks.
You might need to put the loading of data into the grid into a background worker process. Then you can use the enquire Progress Bar tool and enquire of the background working to update the progress.
Here is one example of this occuring, but insteadof using the Progress Bar tool, they have simply output a string of the percent complete.
http://ms-dotnet.blogspot.com/2006/03/backgroundworker-threads_08.html
Hope this helps.
Jason
Hi,
BackgroundWorker only raise event ProgressChanged when you call method ReportProgress(). Could you show me how to calculate percent complete of loading data into grid and grid render to display.
My application have data about 20.000 - 50.000, so I need this very much.
Thanks!
I am using a progress animation to visualize the loading progress. It looks like the progress control the SQL server 2005 is using. When the loading was started, the control will be shown (RotatingProgress.Show() for example). And when the BackgroundWorker raise the Completed event, the control will be hidden.
If you using a DataTable as DataSource for the grid I have some code using the DataReader to load rows just in time into the grid. This code will also using a BackgroundWorker. I have the code not here at work, but I can put it here today.
Kind regards,
Ralf