Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to remove the expand/collapse button from the jqGrid header?

I'm using the jqGrid available at http://www.trirand.com/jqgrid/jqgrid.html and I can't find a way to disable its expand/collapse button on the top right of the header. Anyone know if there's an option to do that?

I'd like to remove the thing circled in red: alt text

like image 342
btelles Avatar asked Jan 06 '10 18:01

btelles


2 Answers

Yes, there is an option for this: hidegrid: false


From the jqGrid documentation wiki for Options:

hidegrid

boolean

Enables or disables the show/hide grid button, which appears on the right side of the Caption layer. Takes effect only if the caption property is not an empty string.

like image 140
Justin Ethier Avatar answered Sep 24 '22 17:09

Justin Ethier


Use this code to colllapse all jqgrid on the page

elements = $('div.ui-jqgrid-bdiv'); elements.each(function() { $(this).css("display", "none"); }); elements = $('div.ui-jqgrid-hdiv'); elements.each(function() { $(this).css("display", "none"); }); $('#JQGrid_pager').hide(); $('#rs_mJQGrid').hide(); 
like image 24
Pankaj Pravin Avatar answered Sep 20 '22 17:09

Pankaj Pravin