My grid options are:
defaultColDef: {
sortable: true,
filter: false,
resizable: true,
cellStyle: function(params) {
if (params.node.data.missing && params.node.data.missing.indexOf(params.column.colId) >= 0) {
return { background: '#fe7979' };
} else {
return null;
}
},
}
This works fine. If we're painting the column of an item that is in params.node.missing, it paints the background red. Otherwise, it uses the default color
The caveat is that params.node.missing changes via external validation. The next time the cellstyle callback comes around, it does realize that it should not be painted red anymore. However, when I return null, it seems to leave the background as-is (eg red). Am I missing something?
Note: I got into explicitly returning the cell color I wanted but then that starts to muck up colors when a row is selected.