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

Virtualized Grid losses selection

3 Answers 72 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Anna
Top achievements
Rank 1
Anna asked on 25 Apr 2016, 12:01 AM

Hi,

I have a grid with scrollable: { virtual: true }, pagesize: 25 setup with local data. I select a row and scroll away so paging happens, when I scroll back, and selection is lost. I saw other threads with suggested solution to do hacks around onChange and onDataBound event: http://jsbin.com/himuboxi/2/edit?html,output

My problem is, my grid is bound to local data, thus the DataBound event is fired when I scroll around. What other event could I depend on?

 

Best,

Ama

3 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 26 Apr 2016, 10:32 AM
Hello,

This behavior is expected as the idea behind the virtualized grid is to render only the number of items needed by the customer. So when you scroll and the records are re-rendered the selection is lost. The only workaround will be to save the ID of the selected record and use the dataBound event to select it back. Please see this sample:

http://dojo.telerik.com/ALonI

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Anna
Top achievements
Rank 1
answered on 26 Apr 2016, 07:39 PM

Hi Kiril,

I'm aware of what you mentioned, but please read my question in detail => my grid is bound to local dataSource, so the dataBound event never fires. My question is: is there any other events I can listen to re-select the row? If not, is there any other hack I can try?

Also, maybe in respect to the virtualized grid, losing selection is expected, overall as a grid, I believe it's a bug. At least it's a bug to the selection function of the grid. I hope in the future, the kendo team will smoothen this problem.

 

Regards,

Ama

0
Kiril Nikolov
Telerik team
answered on 27 Apr 2016, 08:06 AM
Hello,

I am afraid that there is no such event for local data binding. I would suggest you to send a feature request in our Feedback forum, so it can be considered for future implementation.

Regards,
Kiril Nikolov
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
Anna
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Anna
Top achievements
Rank 1
Share this question
or