Toggle visibility jqGrid from outside the grid.

January 15, 2010 by Reboot · Leave a Comment 

The only way I found working:

// Hide the grid when it is visible.
if ( $('#yourtableid).getGridParam('gridstate') == 'visible') {
   $('#gview_yourtableid a.ui-jqgrid-titlebar-close.HeaderButton').trigger('click');
}

Any other thoughts on this are more than welcome!

Couldn’t find a jqGrid function to do it “properly” from outside the grid.
Setting the gridstate and refreshing didn’t work ?!?

About Reboot
Software Engineer - http://www.linkedin.com/in/orlissenberg

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!