css code:
.x-grid-back -red {
background: #FF0000;
}
js code:
{
header: 'divide type',
dataIndex: 'divideType',
renderer: function(v,m){
m.css='x-grid-back-red';
return v;
},
width : 60
}
Or directly like this You can also write
{
header: 'Number' ,
dataIndex : 'fcId',
css : 'background: #FF0000;',
width : 40
}
extjs grid sets the font color of a certain row
css code:
.x-grid-record- red table{
color: #FF0000;
}
js code:
code
viewConfig: {
forceFit: true,
getRowClass: function(record,rowIndex,rowParams,store){
// Disable data display in red
if(record.data.zt==0){
return 'x-grid-record-red';
}else{
return '';
}
}
},