如何在jqgrid中以编辑形式显示只读字段或以其他方式显示只读列中的全文 [英] how to show readonly fields in edit form in jqgrid or other way to show whole text from readonly column
问题描述
jqGrid colModel包含使用以下属性定义的只读多行列. 内容行长度大于列宽,文本太长,因此工具无法显示其全部内容.无法看到全部内容.
jqGrid colModel contains read-only multi line column defined using properties below. Content line lenghts are greater than column width, text is to long so that tooltio does not show its whole content. It is not possible to see whole content.
我正在寻找一种允许用户查看整个列内容的方法. 例如,如果按下编辑表单"按钮,则此列内容应在编辑表单中显示为只读文本区域. 但是,只读列不会显示在编辑表单中.
I'm looking for a way allow user to see whole column content. For example, if edit form button is pressed, this column content should de displayeid in edit form as readonly textarea. However, readonly columns does not appear in edit form.
如何允许用户查看整个列的内容?
How to allow user to see whole column content ?
colModel: [{
"name":"LoggedLongText",
"editable":false,"width":539,
"classes":"jqgrid-readonlycolumn","fixed":true,
"hidden":false,"searchoptions":{"sopt":["cn","eq","ne","lt","le","gt","ge","bw","ew","nc"]}}
}]
推荐答案
是设置
editable: true, editoptions: { readonly: "readonly" }
可能您需要什么?
更新:免费jqGrid 支持editable
的更多值从4.8版开始的媒体资源. 维基文章描述了"hidden"
,"disabled"
和"readonly"
.
UPDATED: Free jqGrid supports more values for editable
property starting with version 4.8. The wiki article described that editable
can be function and it supports additionally three string values in case of using form editing: "hidden"
, "disabled"
and "readonly"
.
这篇关于如何在jqgrid中以编辑形式显示只读字段或以其他方式显示只读列中的全文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!