2012-01-17 63 views
0

是否有可能调整jqGrid添加一些类到EditForm的输入?例如,我可以通过在colModel部分中指定属性classes将类添加到单元格。我想知道,是否存在类似的投入机制?JqGrid和自定义类

回答

2

有像colModelclasses没有确切的属性,但你可以使用dataInit回调editoptions要添加的类别或做其他类型的输入字段初始化动作。例如,代码

editoptions: { dataInit: function (elem) { $(elem).addClass('ui-state-highlight'); 

添加预定义“UI状态高亮”类jQuery的用户界面(参见here)的输入框。其结果是可以接受的结果类似如下

enter image description here

the demo在哪里添加CSS类'ui-state-highlight''Client'场和类'ui-state-error''Tax'领域。