[Lazarus] db grid/dataset components that only load currently visible records?

Luca Olivetti luca at wetron.es
Fri Feb 24 16:44:16 CET 2023

El 24/2/23 a les 11:10, Michael Van Canneyt via lazarus ha escrit:
> No.
> RecalcBufListSize does not necessarily fetch all the records. It fetches as
> much records as needed: 10 by default, but classes such as TDBGrid may set
> the number of needed records to the number of visible grid lines.
> It can be that TBufDataset fetches all records on open, there is a 
> property that
> controls this. But it can also fetch on an as-neede basis.
> FEOF is simply initialized from the first batch. But it is maintained 
> based on the result of GetNextRecord. Check the MoveBy procedure.
> Only when GetNextRecord returns false, is FEOF set to True (line 2005).

Thank you!

With these insights (and a lot of sweat, blood and tears ;-)) I managed 
to write a descendant dataset that does what I want. Not 100% complete 
yet but getting there.

Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007

More information about the lazarus mailing list