6

I'm using the column chooser feature of jQgrid. Is there a way to hide certain column (e.g. db id) from the column chooser so that user will not be able to 'reveal' them?

jackysee
  • 2,051
  • 4
  • 32
  • 38

1 Answers1

16

Yes you should use

hidedlg: true

property in colModel additionally to hidden: true.

Oleg
  • 220,925
  • 34
  • 403
  • 798
  • old but still helped me :D – Harshit Oct 01 '15 at 07:31
  • @Harshit: It's good to know. I recommend you to take a look in [the answer](http://stackoverflow.com/a/29374787/315935), which demonstrates `showHideColumnMenu` method included as plugin. One can use `sortable: true` option of jqGrid to allow to reorder columns using drag and drop of column headers and to use `showHideColumnMenu` to allow to hide/show columns using context menu in column header (see [the demo](http://www.ok-soft-gmbh.com/jqGrid/OK/createContexMenuFromNavigatorButtons.htm) from [the answer](http://stackoverflow.com/a/29374787/315935)). – Oleg Oct 01 '15 at 07:40
  • @Oleg we are already using columnchooser as it provides better UI with drag and drop function. My issue was that frozen col were also visible in menu and the user were complaining that its not working. So we wanted to hide all the frozen columns, now hidedlg works directly in our requirements.. Though as an improvement for UX i would advise that we can hide frozen cols from the col chooser as a default, as in any case they will not change their visibility or location – Harshit Oct 01 '15 at 08:37