jqgrid:setCell方法>如何设置第四个参数的类? [英] jqgrid : setCell method > how to set class of the fourth parameter?

查看:125
本文介绍了jqgrid:setCell方法>如何设置第四个参数的类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设置setCell方法的第四个参数: class 参数

how to set the fourth parameter of the setCell method : the class parameter

$("#myGrid").jqGrid('setCell',rowid,'label', **class** ,{color:'black', weightfont:'bold'});

谢谢!

推荐答案

您只需在CSS文件中定义一个新类,例如

You can just define in your CSS file a new class like

.MyCell {
  color:'black';
  weightfont:'bold'
}

然后使用

$("#myGrid").jqGrid('setCell',rowid,'label', '', 'MyCell');

在我看来,遵循以下步骤也可以

It seems to me that following will also work

$(#myGrid").jqGrid('setCell',rowid,'label','',{color:'black',weightfont:'bold'});

$("#myGrid").jqGrid('setCell',rowid,'label', '', {color:'black', weightfont:'bold'});

这篇关于jqgrid:setCell方法>如何设置第四个参数的类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆