18 May, 2017
4 Comments
1 category
I had a strange problem in Kendo grid, when a the last row was canceled the values of the first row were shown in the last row.
The first fix was adding a cancel even handler:
cancel: function (e) {
this.cancelChanges();
}
This fixed the bug, but introduced an other one.
Now rows would persist the canceled values.
To fix both problem I changed the event handler to:
cancel: function (e) {
this.cancelChanges();
}
I used kendo 2017.1.118
Tags: Kendo UI
Category: Uncategorized
Both the “before” and “after” changes look the same. What was changed?
you should read that grid on cancel
I have still facing problem after add and update then edit that same row.
I had a similar issue with the MVC Grid. If a user selected the edit button and canceled. The line data would be replaced by the data of the first record. If the user left the page or refreshed, the grid would clear up. However, if the user did not notice and selected edit again the underlying data would then be changed. In our case we were using 4 columns as the primary key. The control would get confused. Because I had no control over the database structure I created a View Model with a string ID. Then in the Grid Read method I concatenated those 4 columns into a single Primary Key for each record. This resolved the issue with the control. However, in the update or delete methods I had to re-query the original record using the 4 columns, make changes to the original record and save. It works without issue but is ugly to say the least. Hope this helps.