How do I add custom CSS classes to rows in a data grid (Ext.grid.Panel
)?
I\'m using ExtJS 4.0.
If you want to change the class after the data has loaded, you can do it like this:
myGridPanel.getView().removeRowCls(rowIndex,"old class");
myGridPanel.getView().addRowCls(rowIndex,"new class");
Here, rowIndex is the selected row, which you can get in some event functions(like "select"). By using this, you can change CSS of the row after clicking it.