166
rated 0 times
[
171]
[
5]
/ answers: 1 / hits: 36836
/ 13 Years ago, mon, october 3, 2011, 12:00:00
How do I add custom CSS classes to rows in a data grid (Ext.grid.Panel
)?
I'm using ExtJS 4.0.
More From » extjs
How do I add custom CSS classes to rows in a data grid (Ext.grid.Panel
)?
I'm using ExtJS 4.0.
The way to do it is to define viewConfig
on the grid:
Ext.create('Ext.grid.Panel', {
...
viewConfig: {
getRowClass: function(record, index, rowParams, store) {
return record.get('someattr') === 'somevalue') ? 'someclass' : '';
}
},
...
});