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

后端 未结 3 627
梦毁少年i
梦毁少年i 2020-12-30 20:07

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. An

相关标签:
3条回答
  • 2020-12-30 20:22

    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.

    0 讨论(0)
  • 2020-12-30 20:25

    If you want to disable the main grids toggle button then you can set

    hidegrid: false
    

    If you are trying to disable or hide the subgrids expand and collapse button then use this on loadcomplete

    jQuery("#GridTeableID").jqGrid('hideCol', "subgrid");
    
    0 讨论(0)
  • 2020-12-30 20:29

    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();
    
    0 讨论(0)
提交回复
热议问题