editGridRow模式下的JqGrid视图列 [英] JqGrid view-column in editGridRow-mode
问题描述
有没有一种方法可以将modalDialog中的列定义为视图列(没有任何输入元素,既不可编辑也不可保存)?还是只能通过edittype:'custom'
起作用?
is there a way to define a column in modalDialog as view-column (without any input elements, neither editable nor saveble)? Or does it work only through edittype:'custom'
?
我的设置在那里:
http://babiychuk.com/demo/en/catalog/index/c_picture
推荐答案
jqGrid使用$.jgrid.createEl
方法为任何类型的包含编辑的内容构建元素 editGridRow ).您如何在函数createEl 它将<input>
,<select>
,<button>
,<textarea>
或<span>
元素用于表单对话框的输入"部分.选择取决于相应jqGrid列的 edittype
jqGrid use $.jgrid.createEl
method to build elements for any types of editing inclusive form editing (the function editGridRow). How you can see in the source code of the function createEl it use <input>
, <select>
, <button>
, <textarea>
or <span>
elements for the "input" part of the form dialog. The choose depend on the edittype of the corresponding jqGrid column.
因此,您必须使用编辑类型:"custom" 具有<span>
元素,或者您可以尝试在 beforeShowForm 事件处理程序.
So you have to either to use edittype:'custom' to have <span>
element or you can try to modify form elements inside of your beforeShowForm event handler.
这篇关于editGridRow模式下的JqGrid视图列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!