[Gambas-user] Gridview_data - when is it finished? Embarrasingly solved.
bb
adamnt42 at gmail.com
Tue Feb 1 08:28:32 CET 2022
On Mon, 2022-01-31 at 22:42 +0100, Gianluigi wrote:
> Il giorno lun 31 gen 2022 alle ore 19:10 T Lee Davidson <
> t.lee.davidson at gmail.com> ha scritto:
>
> > 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
> >
>
> But I don't understand the question, 11000 tuple for the
> GridView_Data
> event are nothing and elaborates them in a few tenths of a second.
>
> Regards & Good Night
> Gianluigi
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
Yes, you are right. I explained badly.
The grid has 127 columns, of which a maximum of 31 are visible, and
displays up to 30 rows at a time, so that's up to 31*30=930 data events
fired depending on the scrolling. As you say, this takes moments.
My problem is this, the user can click on a column or a row or a cell
and depending on which, certain summary statistics are to be performed
...
hang on! I just answered myself. I was trying to put the summarisation
in the wrong "event". Sheesh, sorry about the noise.
b
More information about the User
mailing list