I have one column in JQGrid.
{ name: 'Action', index: 'Action', width: 70, sortable: false, formatter: 'actions', formatoptions: { keys: true, editformbutton: false, editbutton: true, delbutton: false } }
I want to hide the above column while viewing a selected row from JQGrid pager button. Is there any way to achieve this?
You need add
viewable: falseproperty to all columns which you don't want to show in View dialog.You added only
sortable: falseas property toActioncolumn. I would recommend you to include some other properties to the column where you useformatter: "actions":I define typically the column template (see the answer for example) for
formatter: "actions". I include all the above properties (and some other settings like defaultwidth,formatoptions: { keys: true }and other) which I use typically. In the way the code of the grid will be smaller and better readable.