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.
Asked
Active
Viewed 51 times
0
-
1Please post your code. – ᗩИᎠЯƎᗩ Apr 28 '14 at 23:01
-
Please refer to these example it may help you [click to you old post][1] [1]: http://stackoverflow.com/questions/19904432/extjs-change-grid-cell-background-based-on-value/19905470#19905470 – Surya Prakash Tumma Apr 29 '14 at 12:03
1 Answers
0
This article is very helpful.
You can style a row based on the values of you 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.

A1rPun
- 16,287
- 7
- 57
- 90