在colModel中加上cellattr
colModel: [
{name: '列名称',index: '列名称',width: 65,sortable: true,resizable: false,cellattr: addCellAttr}
]
然后添加addCellAttr方法
function addCellAttr(rowId, val, rawObject, cm, rdata)
{
if (条件) {
return "style='color:red'";
}
}
colModel: [
{name: '列名称',index: '列名称',width: 65,sortable: true,resizable: false,cellattr: addCellAttr}
]
然后添加addCellAttr方法
function addCellAttr(rowId, val, rawObject, cm, rdata)
{
if (条件) {
return "style='color:red'";
}
}