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

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

4

1 回答 1

1

我自己不使用 Struts2。一般来说,jqGrid允许editoptions. 例如使用

editoptions: {size:10, maxlength: 15}

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

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

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

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

于 2013-04-16T09:43:49.267 回答