Declined
Last Updated: 28 Dec 2021 14:11 by Alan
Alan
Created on: 17 Dec 2021 19:43
Category: MultiSelect
Type: Bug Report
0
Virtualized Rows OnRead for MultiSelect, DropDownList, and Grid

This appears to be documented behavior, but it also seems to me like this is something that the component should be handling.

When using row virtualization with a Grid, a DropDownList, a MultiSelect, etc, the OnRead is called for every scroll event, regardless of whether the component _actually_ needs to fetch new data or not.

 

For example:  A DropDownList with a PageSize of 100, but with only 10 items visible in the dropdown at a time will ask for 100 records every time the user even scrolls 1 record down. This results in many requests to the backend server, with many of the results being the majority of the contents from the previous request.

 

I have worked around this by implementing a buffer that keeps results for me and returns them as the user scrolls, only requesting for more from the backend server when the buffer runs out, but this feels like something that the components themselves should be handling.

 

If this is expected behavior, all good.  Just wanted to raise some awareness on it.

2 comments
Alan
Posted on: 28 Dec 2021 14:11
An endless scrolling feature looks like it is more what I am looking for.  Thanks.
ADMIN
Joana
Posted on: 24 Dec 2021 13:12

Hi Alan,

Thank you for sharing your feedback.

By design, the virtualization feature is an optimization for the rendering - to assure that always a small set of items are rendered. For example, for page size 10 we always have 10 rendered items, and by scrolling we move the offset to take the 10 items from the current position. The feature is implemented this way to assure smooth user experience and loading of next set of features.

The implementation you have described with buffer collection is the exact approach we recommend to limit the requests per your scenario. I hope you understand that such customizations might look good for some projects, but sometime there might be specifics with database, or the hosting model of the app. That is why, we leave the choice to our customers and provide flexible mechanism to achieve any scenarios. Thus, I am marking this request as Declined, but we will still continue to track the interest and feedback here.

You might find interesting an endless scrolling feature that is design to fetch data on chunks. We have it logged as a feature request that you could track below:

https://feedback.telerik.com/blazor/1516171 

Regards,
Joana
Progress Telerik

Learn about the important changes coming in UI for Blazor 3.0 in January 2022!