I have some questions regarding the limitations of virtual scrolling and I am referring to your documentation: http://docs.telerik.com/kendo-ui/controls/data-management/grid/appearance#virtual-scrolling
1) "Virtual scrolling relies on a fake scrollbar. Its size is not determined
by the browser, but is calculated based on the average row height of
the data that is already loaded. As a result, variable row heights may
cause unexpected behavior, such as inability to scroll to the last rows
on the last page." and "Virtual scrolling relies on calculating the average row height based on
already loaded data. Having a large variance of row heights or an
unknown number of rows that are not bound to data (such as group
headers) might cause unexpected behavior:":
To prevent this, I am calling resize(true) on the grid widget every time the data is bound (dataBound event handler). It seems like this works, but am I missing something?
2) "Virtual scrolling is not compatible with grouping, hierarchy, and editing":
I am using a grid with batch editing mode, and it seems to work. Could you please share some details about what's not compatible with editing exactly?
And what are the known incompatibilities with grouping? I have found out, that the grid does not remember collapsed groups when the page size is crossed while scrolling and the next page of data items is bound to the grid, so the collapsed groups get automatically expanded again. Also, if a group is being collapsed, the space of the previous shown data items remains blank, instead of the next group being shown immediately below.
Thank you in advance for providing information about the grid virtual scrolling limitations of the current Kendo UI release version.
8 Answers, 1 is accepted
Thank you for reading the documentation
1) Yes, calling resize() is what we recommend. This is the best we can offer without a way to know all row heights in advance.
2) Inline editors will be reset every time the row moves out of the viewport. If you scroll back the row will not be in edit mode anymore.
Popup editing is affected too, as the viewport will be redrawn on scroll.
For grouping - that's about it. The most sever limitation is that collapsing the group will not pull records from below.
I hope this makes sense.
Telerik by Progress
Thank you for your clarifications.
Inline editors behave very similar in paging mode. They will also be reset when browsing to another page. So at least this behavior is not worse in virtual scrolling mode.
However, the grouping functionality is very important for our business application. That collapsing a group will not pull records from below is not very beautiful, but we can live with that. The bigger problem is when having groups with large data sets. When you collapse such a group and you want to scroll down to the next group, all the collapsed groups will be expanded as soon as the next virtual page is hit by the user. This breaks the grid usability for the user.
Do you think this could be solved by incorporating your example on how to "Persist Collapsed State of Grouped Records" (http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/state/persist-grouped-grid-collapsed-details-state#persist-collapsed-state-of-grouped-records)? Do you have any experience with that? Are there any known issues or downsides of adding "Persist Collapsed State of Grouped Records" functionality to virtual scrolling? If this could be solved, virtual scrolling would be a wonderful solution for our business application.
Agreed on inline editors. Still, navigating to a different page is a more conscious action than scrolling a single row up or down.
The solution for persisting the collapsed state can work, at least in theory, in a virtualized Grid.
We've prepared a proof of concept, but it's not without its flaws. You'll notice a flicker while the groups are collapsed.
Telerik by Progress
Does Virtual scroll works with detail templates?
Unfortunately not, virtual scrolling is not compatible with hierarchical Grid set up. All limitations of virtual scrolling are listed here:
Limitations of Virtual Scrolling
Telerik by Progress
Is there any chance virtual scrolling will work with grouping in future releases?
There aren't plans as of current to introduce grouping support with virtual scrolling. As explained in the docs,virtual scrolling relies on calculating the average row height based on already loaded data. Having a large variance of row heights or an unknown number of rows that are not bound to data (such as group headers) prevents the correct calculation of the scroll height.
A limitation of virtual scrolling, which will soon be resolved, is data editing. This is already in development.