This is a migrated thread and some comments may be shown as answers.

virtual scrolling doesn't work with dynamic data?

4 Answers 557 Views
Grid
This is a migrated thread and some comments may be shown as answers.
CK
Top achievements
Rank 1
CK asked on 06 Nov 2014, 03:44 PM
I'm evaluating Kendo grid. For large tables, I need virtual scrolling.  (I'm aware of the "pageable" feature but that is not acceptable for my UI requirements, I can only use a scrollbar).

But virtual scrolling only seems to work if the data is static?  If I scroll in the grid and then refresh the data, the scroll position "jumps" several rows down and then if I attempt to scroll, the scrolling goes completely awry -- the wrong rows are displayed, old data values are displayed, and the scrollbar knob sometimes disappears. 

Am I doing something wrong?  Virtual scrolling is not useful if it doesn't allow me to refresh the data. 

Here is a fiddle:  http://jsfiddle.net/4hmgxL02/

Scroll down to about row 1000, then click "update rows".  This will change the row values. Notice that the row position jumps, even though the update does not change the row count. Then try to scroll and it jumps to the wrong row and displays old data values, from before the update.  It all works fine if I set scrollable:true rather than {virtual:true}, but of course that hurts performance with large tables and is not acceptable.

4 Answers, 1 is accepted

Sort by
0
CK
Top achievements
Rank 1
answered on 06 Nov 2014, 03:50 PM
Sorry, that was the wrong fiddle!

Here is mine:  http://jsfiddle.net/fssgmfdr/1/
0
Dimo
Telerik team
answered on 10 Nov 2014, 01:49 PM
Hello CK,

Unfortunately, when virtual scrolling is used, there is no guarantee that the same scroll position will be persisted when the Grid is rebound. There is no workaround for this limitation.

Regards,
Dimo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
CK
Top achievements
Rank 1
answered on 10 Nov 2014, 02:10 PM
OK thanks for the reply. But frankly that answer is quite disappointing.  Are there plans to enhance virtual scrolling to support dynamic data?

There are other grid packages (including the one that I was hoping to replace with Kendo) that support virtual scrolling / deferred rendering in combination with dynamic data. That is a necessary feature on large tables, especially in older browsers.
0
Dimo
Telerik team
answered on 12 Nov 2014, 08:27 AM
Hi CK,

The current implementation of the Grid virtualization allows the scrolling logic to go in one direction only - when the scroll position is known, the corresponding records are loaded and displayed. The reverse logic is not supported and I am afraid this feature is not in our to-do list. Sorry about that.

Regards,
Dimo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
CK
Top achievements
Rank 1
Answers by
CK
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or