可以在grid的onCellRender中通过列获取对应的单元格设置其背景颜色,如下
Model.prototype.grid1CellRender = function(event) {
if (event.row !== null) {
if (event.colName == 'fSZ' && event.colVal >0) {
setTimeout(function() {
event.source.setCell(event.rowID, event.colName, {
backgroundColor : 'red'
});
}, 1)
}
}
};
评一波