如何在Struts2jquery网格中增加行的文本框大小?

时间:2013-04-16 08:53:34

标签: jqgrid struts2 struts2-jquery

<sjg:gridColumn name="scenarioDescription"
                index="scenarioDescription"
                title="Scenario Description" 
                sortable="true"
                editable="true" 
                edittype="text" />

我尝试在标签内使用width =“250”,但它无效。我是jquery的新手。任何帮助,将不胜感激。提前致谢

1 个答案:

答案 0 :(得分:1)

我自己不使用Struts2。通常,jqGrid允许在editoptions内设置编辑控件的任何标准选项。例如

的用法
editoptions: {size:10, maxlength: 15}

添加了在编辑期间创建的size="10"元素的maxlength="15"<input>属性。

如果我查看struts2-jquery的网格部分的the documentation,您似乎可以通过向editoptions元素添加editoptions属性来指定<sjg:gridColumn>。你可以试试像

这样的东西
<sjg:gridColumn name="scenarioDescription"
                title="Scenario Description" 
                editable="true"
                editoptions="{size: 10, maxlength: 15}" />

您可以选择的属性sizemaxlength或其他属性的确切值符合您的要求。

相关问题