0

How can hide navgrid in jgqrid? I want show jqgrid without navgrid.

ZSH
  • 631
  • 5
  • 16
  • 36

1 Answers1

4

If you need create navigator bar to be able to use navButtonAdd or inlineNav you can use navGrid with corresponding parameters

$("#grid").jqGrid("navGrid", "#pager",
    {add: false, edit: false, del: false, search: false, refresh: false});

As the result the table with navigator bar will be created, but it will be empty:

enter image description here

Another way is opposite: you can create navigator grid with all buttons, but hide it immediately. Such behavior could be helpful if you need to show/hide navigator button based on context (depend on selected row for example) or based on the permission of the user on the backend. See the answer for details.

If you need to hide the whole navigator bar you can use code like

$("#pager").find("table.navtable").hide();
Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798