Dataprocessor - set only changed cells to bold?

I’m using Grid with DataProcessor in a configuration dialog. Using manual updates, so user can change multiple things at once.



I noticed that when a value is changed, all cells in that row get bold text. I need only the cells that actually were edited in that row to be bold, and the rest to retain original style. Is that possible?


Data Processor doesn’t provide a ready solution.


You can try to use “onRowMark” event to block default Data Processor’s marking.


dp.attachEvent(“onRowMark”,function(rowId,state,mode){ /state:true/false;mode can be inserted, updated,deleted/
if(state && mode==“updated”){
yourFunction(rowId)
return false
}
return true
})


Here you can find the changed cells in the row and mark them.



Is there functionality in the grid to tell me which cells are changed compared to initial load, or will I have to keep parallel data structure to use this solution?

To find out if cell was changed you can use wasChanged() cell’s object method:
myDataProcessor.attachEvent(“onRowMark”,function(id,state,mode){
if(state&&mode==“updated”){
mygrid.forEachCell(id,function(obj){
if (obj.wasChanged()) obj.cell.style.fontWeight=“bold”;
});
return 0;
}
return true;
})

Thank you. Works like a charm for ed, edn and combo excells. ch presents a problem, as check box doesn’t get bold. Any suggestions? Is there a way to get excell type for a cell, so I could maybe play with color or size…?

You can get type of the column using getColType(cInd) method:
mygrid.forEachCell(id,function(obj){
var type=mygrid.getColType(obj.cell._cellIndex);

});

Also you can check if cell is checkbox using isCheckbox() method:
mygrid.forEachCell(id,function(obj){
if (obj.isCheckbox()) {

});