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 you can write it directly like this
{
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 '';
}
}
},
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn