I am trying to change cell color when cell old value != cell new value in a grid.
I've tried:
if (e.oldValue === e.newValue) {
e.colDef.cellStyle = function(e) {return { backgroundColor: 'green' };
}
But when save is hit or data is reloaded, it changes the column color to green.
onCellValueChanged = e => { console.log(e); // access the entire event object e.data.modified = true; if (e.oldValue === e.newValue) { e.colDef.cellStyle = function(e) { return { backgroundColor: 'green' }; }; } }
I need to change the color of cell which has changed value. – Tulika