How To Hide Column in jQgrid but show this Column in Add/Edit panel

*爱你&永不变心* 提交于 2019-12-09 11:30:47

问题


I want a form of control I use. But the number of fields that are too high. How can I display the grid, but only some of the fields in the form add/edit popup panel show all fields ???


回答1:


Here is how you can do this:

colModel:[
    {
        name:'email',
        label: 'E-mail',
        editable: true,
        hidden: true,
        editrules: {edithidden: true}
    }

The E-mail column will not appear in the grid but it will be present in the edit dialog.

BTW to achieve the opposite (display in the grid but not in the edit dialog):

colModel:[
    {
        name:'email',
        label: 'E-mail',
        editable: false
    }



回答2:


Use hidden property for your column

example:

<sjg:gridColumn name="a_unid" index="a_unid" title="Ref id"  hidden="true"/>


来源:https://stackoverflow.com/questions/9110352/how-to-hide-column-in-jqgrid-but-show-this-column-in-add-edit-panel

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