Virtual scrolling with unknow total data and filtering

1 Answer 58 Views
Animation Data Query Filter  Grid
dahawas
Top achievements
Rank 1
dahawas asked on 25 Mar 2022, 07:23 AM

Hi,

I have a virtual scrolling in my grid, it's unknow total data because it depend which user is connected and if there is filter applied, so I just set total to 10000 , because I didn't find any solution to change the total depending on data loading.

So first issue is :

Is it possible to have virtual scrolling without knowing the total data length?

Another problem that I'm struggling with is virtual scrolling with Filtering, after applying a filter on the data I have empty rows in my grid (because now the data length is less than 10000- the total data decaled before).

So the big question is : Is that possible to have virtual scrolling with Filtering and unknow total data length?

I'm adding my code, if this is not possible so what you recommend me to do?

 

Thank you

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 28 Mar 2022, 10:16 AM

Hello,

Currently, both of these are requirements for virtual scrolling:

https://www.telerik.com/kendo-react-ui/components/grid/scroll-modes/virtual/

(Required) pageSize—To avoid unexpected behavior during scrolling, set pageSize to at least the number of the visible Grid elements. The number of the visible Grid elements is determined by the height and rowHeight settings of the Grid. - This will not be met with filtering as we may have 1 2 items only.

(Required) total - We need the total in order to currently calculate the scrollbar height calculate the step.

Without both of these, we can recommend paging or infinite scrolling as the virtual scroll requirements are not met:

https://www.telerik.com/kendo-react-ui/components/grid/scroll-modes/#toc-infinite-scrolling

https://www.telerik.com/kendo-react-ui/components/grid/paging/

Regards,
Stefan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Animation Data Query Filter  Grid
Asked by
dahawas
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or