0

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.

1 Answers1

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