简体   繁体   English

jqGrid - 如何修改form_editing构造?

[英]jqGrid - How to modify form_editing construction?

In the jqGrid documentation to form_editing, I see how the form_editing is constructed. 在form_editing的jqGrid文档中,我看到了form_editing是如何构造的。

<form ...>
    <table>
        <tr id='tr_myfield'>  
          <td> Caption</td> 
          <td>edited element named, in colModel, as "myfield"</td> 
        </tr> ... 
    </table> 
</form>

Can I change this construction ? 我可以改变这种结构吗?

It's necessary to me because I have too many columns to edit in my form and I want to display the form in most userfriendly way. 这对我来说是必要的,因为我有太多的列可以在我的表单中编辑,我想以最友好的方式显示表单。 Eg when I have twenty columns to edit in my table. 例如,当我在表格中编辑了20列时。 I have twenty rows in my form. 我的表格中有二十排。 But I would obtain one row for two columns. 但我会为两列获得一行。 I understood that each rows are identifying by their index, so I can't just have two columns in the same row. 我知道每行都是通过索引来识别的,所以我不能只在同一行中有两列。 But if it's possible to faking it, be sure it's make me happy ^^ (eg with two tables and a similar id or with form_editing parameters that I don't know ...) 但如果它可以伪造它,请确保它让我高兴^^(例如,有两个表和一个类似的id或form_editing参数,我不知道......)

PS : Sorry for my bad English. PS:抱歉我的英语不好。

There are rowpos and colpos properties of formoptions which would be helpful for you. rowposcolpos的性质formoptions这将是对你有帮助。

The demo demonstrate how you can change the standard editing form created by jqGrid to the following 该演示演示了如何将jqGrid创建的标准编辑表单更改为以下内容

在此输入图像描述

If I understand correct your problem the usage of rowpos and colpos could be very helpful in your case. 如果我理解你的问题是正确的,那么使用rowposcolpos对你的情况非常有帮助。

If you need to customize the form, your best bet may be to create your own page and use a plugin such as jQuery UI Dialog to display your custom form. 如果您需要自定义表单,最好的办法是创建自己的页面并使用jQuery UI Dialog等插件来显示自定义表单。 It will be more work since you cannot use the built-in form editing capabilities of jqGrid, but you will have complete control of the layout of the form. 由于您无法使用jqGrid的内置表单编辑功能,因此可以完成更多工作,但您可以完全控制表单的布局。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM