jqGrid without header

2019-02-13 09:44发布

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 there any way to do this?

标签: jqgrid
5条回答
SAY GOODBYE
2楼-- · 2019-02-13 10:13

This works:

var grid = $("#GRID_NAME");
var gview = grid.parents("div.ui-jqgrid-view");
gview.children("div.ui-jqgrid-hdiv").hide();
查看更多
Fickle 薄情
3楼-- · 2019-02-13 10:16

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.

查看更多
神经病院院长
4楼-- · 2019-02-13 10:22

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();
查看更多
Fickle 薄情
5楼-- · 2019-02-13 10:34

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.

查看更多
我欲成王,谁敢阻挡
6楼-- · 2019-02-13 10:38

There is an option for this: hidegrid: false

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

查看更多
登录 后发表回答