I’ve the following viewconfig applied to the grid panel. It is supposed to change the row colour based on a datavalue, but the changes are not visible on the view.
.changed_colour {
background-color: #FFCC00
}
viewConfig: {
//Return CSS class to apply to rows depending upon data values
getRowClass: function (row, index) {
var data = row.data;
return data.NoteType === 'PRIVATE' ? 'changed_colour' : '';
}
}
I notice the style being applied for the row in Firebug:
<tr class="x-grid-row changed_colour">
.x-grid-row .x-grid-cell {
background-color: white;
border-color: #FAFAFA #EDEDED #EDEDED;
border-right: 0 solid #EDEDED;
border-style: solid;
border-width: 1px 0;
font: 11px tahoma,arial,verdana,sans-serif;
}
The above style snippet belongs to Extjs. Can anybody suggest a solution to this?
Thanks
This is because the color is set on the grid cell. You can see it in Firebug or Chrome Developer Tools. To make it work, change your style to: