Reputation: 6068
When an item in a row has been edited, I want to mark the row as dirty using a CSS class.
What's the best way to achieve this?
UPDATE I'm trying this, doesn't seem to work:
data.getItemMetadata = function (row) {
if (data[row].isDirty == true) {
return { "cssClasses": "dirty" };
}
};
grid.onCellChange.subscribe(function (e, args) {
data[args.row].isDirty = true;
});
Upvotes: 2
Views: 2306
Reputation: 9082
Implement getItemMetadata()
and specify cssClasses
for the dirty row.
(https://github.com/mleibman/SlickGrid/wiki/Providing-data-to-the-grid)
Upvotes: 5