I am using ext js grid to generate grids and customizing cell colors. Using a search box functionality the grid rows are filtered, but then the customized colors does not show up. Any suggestion would be helpful.
This article is very helpful.
You can style any row based on the values of your data object like so:
Ext.create('Ext.grid.Panel', {
...
viewConfig: {
stripeRows: false,
getRowClass: function(record) {
return record.get('age') < 18 ? 'child-row' : 'adult-row';
}
}
});
The child-row
& adult-row
are CSS classes with a background-color
.