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

Virtual scrolling looses edits on Checkbox bound column

4 Answers 147 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 30 Apr 2015, 05:26 PM

We are using an editable grid with InCell editing in Batch mode. 

We have a bool column with a checkbox using a client template:

columns.Template(c => c.Active)
                .ClientTemplate("<input type=\"checkbox\" name=\"chkActive\" id=\"chkActive\" value=\"#= Active #\" #= Active?'checked':'' # />")
                .Title("Select")
                .HeaderHtmlAttributes(new { style = "text-align:center" })
                .Width(40).HtmlAttributes(new { style = "text-align:center" });

 

It seems that we aren't getting two way biding though. We check some check boxes, then scroll down so a read occurs to get the next page of records, but when we scroll up the check boxes are no longer checked.

Is this not the correct way to bind a checkbox to a bool column in the editable grid?

4 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 04 May 2015, 09:07 AM

Hello Bob,

This is expected, as when you scroll with virtual scrolling the grid is redrawn and all unsaved changes are lost. In general the Kendo UI Grid does not support editing when virtual scrolling is enabled, so I would suggest you to reconsider this part of your application.

Regards,
Kiril Nikolov
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Bob
Top achievements
Rank 1
answered on 04 May 2015, 02:18 PM

Ok, can you explain why this is? Your controls use MVVM so aren't the changes made to the dataSource? It looks to me that as it pages it only gets that new page of data so the previously fetched rows in the data source should remain, right?

Seems like something you could support. 

 

0
Bob
Top achievements
Rank 1
answered on 04 May 2015, 02:19 PM
Also, if somethings not supported, shouldn't the wrapper throw an exception when you configure it in a non-supported manner? Is this documented?
0
Kiril Nikolov
Telerik team
answered on 07 May 2015, 06:28 AM

Hello Bob,

The controls use MVVM, but if the changes are not saved, when the data is read from the server the changes are lost. Note that we do not have examples, showing virtual scrolling and editing, which we believe is clear that the feature is not supported. We will take another look and putting more explicit documentation stating the same.

Thanks for the understanding.

Regards,
Kiril Nikolov
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Grid
Asked by
Bob
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Bob
Top achievements
Rank 1
Share this question
or