jqGrid without header

后端 未结 5 1875
长情又很酷
长情又很酷 2021-01-05 05:02

I have tried to figure out how to disable the header for a jqGrid, so that the row containing the column names does not show. So far, I have come up with no solution. Is the

相关标签:
5条回答
  • 2021-01-05 05:38

    This works:

    var grid = $("#GRID_NAME");
    var gview = grid.parents("div.ui-jqgrid-view");
    gview.children("div.ui-jqgrid-hdiv").hide();
    
    0 讨论(0)
  • 2021-01-05 05:39

    There is an option for this: hidegrid: false

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

    0 讨论(0)
  • 2021-01-05 05:42

    I don't see that the plugin gives you any options for this, but you could simply find and hide the container for the header.

    ...set up grid...
    
    $('.ui-jqgrid-hdiv').hide();
    
    0 讨论(0)
  • 2021-01-05 05:42

    Not sure why no-one has come up with the CSS solution yet...

    .ui-jqgrid-hdiv {
      display:none !important;
    }
    

    You can scope it using a wrapper container for a single instance if you have other grids that shouldn't be affected.

    0 讨论(0)
  • 2021-01-05 05:48

    Omitting the 'caption' property hides the header.

    Very late I know, but for someone still wanting to know. This was found after looking through the source.

    0 讨论(0)
提交回复
热议问题