2

I want to replace a VCL TDbGrid with a FMX solution.

I choosed a TListView that is connected to the (TQuery-based) data via TBindSourceDB and TBindingsList. All connected via the Visual LiveBindings Designer (like in the MasterDetailTablet_Search example).

I want to display several thousand rows. But with the default settings only 200 records are displayed. If I set AutoBufferCount to True all records are displayed, but this is very slow. All data is loaded into memory.

Is there a mechanism in LiveBindings that allows to fetch the data on demand? (For instance, starting with 200 records in the buffer and filling more if needed.)

If not, any idea how I could start implementing such a feature? There is not much documentation available from Embarcadero.

Community
  • 1
  • 1
Alois Heimer
  • 1,772
  • 1
  • 18
  • 40
  • TClientDataSets have always supported fetch-on-demand, via the PacketRecords property, fwiw. Try experimenting ... – MartynA Jun 02 '16 at 08:26
  • @MartynA My `TQuery` descendant (`TIBOQuery`) does support fetch-on-demand (I used the same query with the original `TDbGrid`). But this does not help, if `TBindSourceDB`/`TListView` is fetching all the data. All I found, regarding this, seems to suggest, that with LiveBindings always all data is fetched. But I am not sure on this one and I found no documentation. – Alois Heimer Jun 02 '16 at 08:38
  • 1
    I just did a test with a TDBGrid and a live-bound TListBox. Connected only to the TDBGrid, my ClientDataSet certainly respects the PacketRecords setting, but with the TListBox bound, it retrieves all its provider-dataset's records. – MartynA Jun 02 '16 at 09:01
  • @MartynA That's what I was trying to say. You found a better wording to describe the problem. – Alois Heimer Jun 02 '16 at 09:33
  • Sure, I was just confirming your observation. If I manage to find a way around it, I'll be back. Meanwhile +1 for an interesting q. – MartynA Jun 02 '16 at 09:37

0 Answers0