`

jqGrid单元格内容设置字体颜色

    博客分类:
  • Js
 
阅读更多
在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'";
}
}
分享到:
评论
1 楼 ccakcc 2013-12-26  
{name: '列名称',index: '列名称',width: 65,sortable: true,resizable: false,cellattr: addCellAttr} 在执行addCellAttr方法时不需要加()吗

相关推荐

Global site tag (gtag.js) - Google Analytics