I've configured my kendo
grid to call a custom service upon clicking "Save Changes" button. Function call is as follows:
saveChanges: function (e) {
e.preventDefault();
$scope.updateLineItems(e);
// Clear red triangles on edited cells
$scope.grid.refresh();
}
Does calling preventDefault()
prevent the grid from resetting the return value of hasChanges()
? When I make a change the value is true. I was hoping that after clicking "Save Changes" it would revert to false, but it does not. I tried adding a line after the grid refresh to manually run the cancelChanges()
method, but that undid the changes in the grid display.
Is there any other method to take the grid out of edit mode?
Thanks in advance
Calling the
preventDefault()
does not prevent from resetting the return value. ThehasChanges()
are determined by thedirty
property. In yourupdate
operation, you should return a success call such ase.success()
for the grid to know that changes have been applied.You can also check their doc: http://docs.telerik.com/kendo-ui/framework/datasource/crud#update-local
Hope this helps!