【问题标题】: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}
    

    为编辑期间创建的&lt;input&gt; 元素添加size="10"maxlength="15" 属性。

    如果我查看 struts2-jquery 网格部分的the documentation,您似乎可以通过将editoptions 属性添加到&lt;sjg:gridColumn&gt; 元素来指定editoptions。您可以尝试类似

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

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

    【讨论】:

      猜你喜欢
      • 2023-03-10
      • 2019-02-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-09-08
      • 2017-08-29
      • 1970-01-01
      • 2015-11-25
      相关资源
      最近更新 更多