[Gambas-user] Gridview_data - when is it finished?

T Lee Davidson t.lee.davidson at gmail.com
Mon Jan 31 19:09:13 CET 2022


On 1/31/22 00:58, bb wrote:
> Is there a way to detect when the gridview_data events have all
> finished?
> 
> I have a db query that returns between a few and upto 11,000 rows, so I
> am loading the grid using the data event handler. After all the visible
> grid rows are loaded I need to do some summary processing.
> 
> It would be rediculous to do it after each cell is loaded. But how do I
> know when it is finished (for the moment)?
> 
> tia
> b

I don't have an answer to your question. But, it seems to me that it would not be necessary to know when the Data events have 
finished. Isn't it logical to assume that they would be finished at, or close enough to, the time when the loop you use to 
iterate over the dataset is finished?

If you think that is not a safe assumption, perhaps you could use a Timer set to an appropriate value and simply Restart it 
within the Data event.

Or, do your summary processing on the dataset itself and let the gridview fill its data in whatever time it pleases.


-- 
Lee


More information about the User mailing list