Virtualization with automatic scrolling using a web API as a data source

I'm trying to implement automatic paging on a grid where the data comes from an API when the user scrolls up and down, passing a Skip parameter as well as a Take parameter. I have spent a lot of time on your web site and I haven't been able to find a sample that does it clearly. Can you post a clear sample app that does this?



3 Replies

SP Sarveswaran Palani Syncfusion Team May 29, 2023 03:26 AM UTC

Hi Andy,

Greetings from Syncfusion support.

Based on your query, we would like to inform you that the skip and take values for paging are determined based on the page size. However, in the case of virtualization, the skip and take values are calculated based on the scroll position. This is the intended behavior of our virtualization feature. If you require a calculated skip count, we recommend using our pagination feature instead of virtualization. The pagination feature allows you to have more control over the skip and take values, providing a better fit for your specific requirements.


If we misunderstood your query, please get back to us with more details.

Regards,
Sarvesh



AR Andy Richard May 29, 2023 12:14 PM UTC

Paging is the opposite of what I'm trying to achieve. We have too many records to return all at once.  I want the user to keep scrolling through thousands, even millions of records by scrolling down without having to click on pager buttons. As the user scrolls, I want the grid to call an API to get more records. When the user scrolls to the end of those records, I want the grid to call the API again to get more records, etc. Is it possible to accomplish this? If so, do you have an example I can use?



SP Sarveswaran Palani Syncfusion Team May 31, 2023 04:03 AM UTC

Hi Andy,

From your query, we would like to inform you that, by default adaptors took skip value & take value to fetch data based on scroller position in virtualization. We have attached sample for your reference. If you have any further queries, please get back to us.

Regards,
Sarvesh


Attachment: SfGridAdaptor_7e8ea8fe.zip

Loader.
Up arrow icon