How to make a button to hide/show a jQuery grid
I need to remove a bu开发者_JAVA技巧tton that hides and shows a jQuery grid (the one on the right top of the grid). How can I do that?
You can set the hidegrid option to false
:
$(selector).jqGrid({
// ...
hidegrid: false
});
put a button in the html with id showGrid and then use this
$("#showGrid").click(function (e){
$("#myGrid").jqGrid('setGridState','visible');//or 'hidden'
return false;
});
精彩评论