jqGrid - How to modify form_editing construction?

旧时模样 提交于 2019-11-26 11:36:47

问题


In the jqGrid documentation to form_editing, I see how the form_editing is constructed.

<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. E.g when I have twenty columns to edit in my table. 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 ^^ (e.g with two tables and a similar id or with form_editing parameters that I don\'t know ...)

PS : Sorry for my bad English.


回答1:


There are rowpos and colpos properties of formoptions which would be helpful for you.

The demo demonstrate how you can change the standard editing form created by jqGrid to the following

If I understand correct your problem the usage of rowpos and colpos could be very helpful in your case.




回答2:


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. 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.



来源:https://stackoverflow.com/questions/10850978/jqgrid-how-to-modify-form-editing-construction

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!