<sjg:gridColumn name="scenarioDescription"
index="scenarioDescription"
title="Scenario Description"
sortable="true"
editable="true"
edittype="text" />
我尝试在标签内使用width="250",但它不起作用。我是jquery新手。任何帮助都会很感激。提前致谢
我自己不使用Struts2。一般来说,jqGrid允许在editoptions
内部设置任何标准编辑控件选项。例如
editoptions: {size:10, maxlength: 15}
添加编辑过程中创建的<input>
元素的size="10"
和maxlength="15"
属性。
如果我看一下struts2-jquery的网格部分的文档,似乎你可以通过添加editoptions
属性到<sjg:gridColumn>
元素来指定editoptions
。你可以试试
<sjg:gridColumn name="scenarioDescription"
title="Scenario Description"
editable="true"
editoptions="{size: 10, maxlength: 15}" />
属性size
, maxlength
或其他您可以选择的确切值符合您的要求。