Jump to content
sjordi

FireDac pagination and scrollbars

Recommended Posts

Hi all,

Just was wondering how to actually link vertical scrollbars to TListViews using FireDac pagination.

All the examples and doc about fetching limited rows for huge datasets talk about reacting to a Back or Next action (probably buttons) when you trigger the fetching of the next set, say, next 100 rows.

This is done this way: FDQuery1.FetchOptions.RecsSkip := FDQuery1.FetchOptions.RecsSkip+1;

 

But how do we connect this with a vertical scrollbar dynamic movement?

 

Is the idea to 

1- get the total number of records

2- get the current vertical scrollbar position (OnScrollViewChange) and calculate where we should proportionally be in the dataset and fetch those rows?

 

It would be awful, very slow, and totally approximate.

Or can the scrollbar be synced with the actually dataset in pagination mode in a more natural way?

 

Thanks for any light. I prefer to ask first rather than try code for 3 days without results 🙂 

 

Steve

Edited by sjordi
  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×