JqGrid和自定义类 [英] JqGrid and custom classes
问题描述
有可能调整jqGrid以在EditForm中的输入中添加一些类吗?例如,我可以通过在 colModel
节中指定属性 classes
来为单元格添加类。而且我想知道,输入存在类似的机制吗?
没有确切的属性 Is it possible to tune jqGrid to add some classes to inputs in EditForm? For example, I can add classes to cells by specifying property There are no exact property like add predefined 'ui-state-highlight' class of jQuery UI (see here) to the input box. As the result you can receive the result like the following See the demo where I added CSS class 这篇关于JqGrid和自定义类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! ,其中添加了CSS类
'ui-state-highlight'
到'Client'
字段和'Tax'
字段的类'ui-state-error'
> classes
in colModel
section. And I want to know, is similar mechanism for inputs exist?classes
in colModel, but you can use dataInit
callback of editoptions to add the class or do other kind of initializing action on the input fields. For example the codeeditoptions: { dataInit: function (elem) { $(elem).addClass('ui-state-highlight');
'ui-state-highlight'
to the 'Client'
field and the class 'ui-state-error'
to the 'Tax'
field.