Search code examples
slickgrid

Slickgrid css class to mark row dirty


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;
});

Solution

  • Implement getItemMetadata() and specify cssClasses for the dirty row. (https://github.com/mleibman/SlickGrid/wiki/Providing-data-to-the-grid)