BoldDesk®Customer service software offering ticketing, live chat, and omnichannel support, starting at $49/mo. for 10 agents. Try it for free.
Hi,
Looks like enabling infinite scroll and the virtualization is not compatible.
The infinite scroll documentation does not mention this in the "Limitations" sect.
Is it a bug or is it really incompatible to enable both ?
See the repro : https://blazorplayground.syncfusion.com/BNryDKrWqVNvboEC
Regards.
Hi Julien Barach,
Based on your query, we would like to clarify that infinite scrolling and virtualization operate on a "load-on-demand" concept, ensuring that data is fetched only when needed, but they follow different approaches.
In the default infinite scrolling mode, a new block of data is loaded each time the scrollbar reaches the end of the vertical scroller. For virtualization feature grid initially renders only the rows present in the viewport and loads the next set of records as you scroll. The "skip" and "take" values are calculated based on the scroll position.
These two features operate on different concepts and are not compatible with each other. Therefore, only one of these features should be used at a time, as this is the default behavior of the grid.
Additionally, we have logged an internal improvement task in our UG documentation to list this "Not Compatible" feature. The correction will be included in one of our upcoming patch releases. We kindly request you to periodically check our website for documentation updates. Thank you for bringing this to our attention.
Regards,
Prathap Senthil
Thank's for your answer.
I understand that technically you use take and skip in both infinite scrolling and virtualization so they are not compatible.
Is it possible for you to consider decoupling take/skip to make them specific for each use case so we can enable both ?
Because the problem is when you enable infinite scroll you will end with a lot of rows and the datagrid could have poor performances handling thousands of rows.
Regards.
As per the previous update, in the default infinite scrolling mode, a new block of data is loaded each time the scrollbar reaches the end of the vertical scroller. In contrast, the virtualization feature initially renders only the rows visible in the viewport and loads the next set of records as you scroll. Therefore, it is not feasible to use both features simultaneously.
The Infinite Scrolling feature operates on a “load-on-demand” concept, ensuring that data is fetched only when needed. In this mode, a new block of data is loaded every time the scrollbar reaches the end of the vertical scroller. This approach significantly enhances the user experience when working with large data collections in DataGrid.
In infinite scrolling mode, a block of data accumulates each time the scrollbar reaches the end of the scroller. Here, a “block” represents the PageSize of the Grid. If the PageSize is not explicitly specified, the Grid automatically calculates it based on the viewport height and row height. This is the default behavior, and it does not cause performance issues. it improves performance by efficiently handling data loading.
For your reference, we have attached a simple sample and documentation.
Reference:
https://blazor.syncfusion.com/documentation/datagrid/infinite-scrolling