I applied a renderer to my grid-column, but the background color is not changing:
renderer: function(value, meta) {
if (parseInt(value) > 0) {
Inspired by Select Smile... this worked for me:
var myRender = function (value, metaData, record, rowIndex, colIndex, store, view) {
if (parseInt(value) < 0) {
metaData.attr = 'style="background-color:#ffaaaa !important;"';
}
return value
};
and the field
{id: 'dta', dataIndex: 'days_to_arrival', renderer: myRender}
that's it.
ps. done under ExtJS v2.2.1