【问题标题】:How do I increase the textbox size of a row in Struts2jquery grid?如何增加 Struts2jquery 网格中一行的文本框大小?
【发布时间】:2013-04-16 08:53:34
【问题描述】:
<sjg:gridColumn name="scenarioDescription"
index="scenarioDescription"
title="Scenario Description"
sortable="true"
editable="true"
edittype="text" />
我尝试在标签内使用 width="250" 但它不起作用。我是 jquery 的新手。任何帮助,将不胜感激。提前致谢。
【问题讨论】:
标签:
jqgrid
struts2
struts2-jquery
【解决方案1】:
我自己不使用 Struts2。一般来说,jqGrid 允许在editoptions 内设置编辑控件的any 标准选项。例如
的用法
editoptions: {size:10, maxlength: 15}
为编辑期间创建的<input> 元素添加size="10" 和maxlength="15" 属性。
如果我查看 struts2-jquery 网格部分的the documentation,您似乎可以通过将editoptions 属性添加到<sjg:gridColumn> 元素来指定editoptions。您可以尝试类似
<sjg:gridColumn name="scenarioDescription"
title="Scenario Description"
editable="true"
editoptions="{size: 10, maxlength: 15}" />
size、maxlength 或其他您可以选择的属性的确切值符合您的要求。