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

Local Data Virtualization with Item Insert/Remove

1 Answer 59 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 28 Mar 2014, 10:11 PM
Hello Kendo Masters,

We have a need to use local data virtualization with manipulation to the data source - namely record inserts and removals.

Is there a good sequence of function calls to make these operations appear as seamless as possible?  (i.e. - add/remove occurs, grid refreshes, maintains scroll position, and virtual scroll bar has re-calculated).

Any input/advice is appreciated, and we don't mind writing code as long as the goal is achieved.

Regards!

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 01 Apr 2014, 03:33 PM
Hello Matt,

I am afraid that this scenario is not fully supported. Basically, virtual scrolling uses ranges instead of pages to determine which items to be displayed, and adding a new item results in miscalculated ranges, which in turn breaks the scrolling. Maintaining the scroll position after refreshing is also a difficult task. You could get the current page and store it somewhere, then once the Grid reloads - go to that page, however that will not re-calculate the scrollbar position.

Regards,
Alexander Popov
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
Matt
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or