I have an editable Kendo grid where I can edit a cell and the grid adds the red mark to the upper left hand corner of the cell.
I go to another page and then come back to the page where the edit took place and the red mark is gone but the newly added value in the cell remains. I saw a response to this on the Kendo site where it was advised that: "In order to show the "dirty flag" every time the grid is rebound it will have to iterate through all the model, check all fields if changed and visible in the grid cells. "
I'm assuming this will need to be done on the DataBound()
event of the grid (seems to fire when I switch pages) where I will manually apply the k-dirty-cell
class to the cell but I can't figure out how to make this work in code. Any thoughts are greatly appreciated.
$(function () {
$("#grid").kendoGrid({
height: 550,
scrollable: true,
sortable: true,
filterable: true,
resizable: true,
reorderable: true,
groupable: false,
editable: true, // enable editing
columns: [
//REMOVED TO SHORTEN EXAMPLE
],
toolbar: [{name: "save", text: "Save All Records"}, "cancel"],
dataSource: {
schema: {
data: "d",
total: function(data) {
return data.d.length;
},
model: {
//REMOVED TO SHORTEN EXAMPLE
}
}
},
batch: true,
pageSize: 10,
transport: {
read: {
},
parameterMap: function (data, operation) {
if (operation == "read") {
//WEB SERVICE CALLS REMOVED... YOU GET THE POINT
}
else if(operation == "update") {
//WEB SERVICE CALLS REMOVED... YOU GET THE POINT
}
}
},
},
selectable: true,
pageable: true,
dataBound: function ()
{
//THIS IS FIRED WHEN I CHANGE PAGEs BUT
//NOT SURE WHAT CODE GOES HERE TO
//REAPPLY DIRTY CELL MARKER
};