I am writing a program in VB.Net for managing text messages sent through an API. It allows you to view messages in a datagridview and filter by date sent / not sent, etc ...
To load the messages, I execute the SQL statement and get a DataTable, which is then set as the DataSource for my DataGridView control.
The problem is that depending on the filters selected, the user can select many records, and it will take some time to update the DataSource. I want to inform the user about this load time by indicating a progress bar or a label of some kind.
I used progress bars before scrolling through the data, but this loads everything all at once. I was thinking about displaying the label when the user clicks on the data load and then hides it when the data is loaded. But this happens instantly, even when data is still loading.
Perhaps there is an event in the DataGridView that I can use? Something like .DataSourceLoadStart and .DataSourceLoadFinished.
I know that I'm just doing these events ... but I hope he clarifies what I want.
source
share