Hi, I have a grid with a detail template that has a checkbox with a databinding and whenever I mark it as checked, the detail template collapses.
Here's an example of the behavior: http://jsfiddle.net/5MU4r/46/
How can I prevent this behavior?
Thanks in advance.
1 Answer, 1 is accepted
0
Daniel
Telerik team
answered on 31 May 2014, 11:11 AM
Hello Gonzalo,
By default when a field of the dataSource is changed and the grid is not in edit mode, the grid will redraw itself to show the changes and therefore the detail will be collapsed. It is possible to prevent the grid from rebinding when a the value is changed by preventing the default action in the dataBinding event e.g.
var ds = new kendo.data.DataSource({
data: [
{ name: "Joe", human: true },
{ name: "Sally", human: true },
{ name: "Bill", human: true }
],
change: function (e) {
if (e.action == "itemchange") {
scholarGrid.one("dataBinding", function (e) {
e.preventDefault();
});
}
}
});
but note that in this case, the column cell content will not be automatically updated.
Regards,
Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!