Yara
Yara

Reputation: 4565

How can I remove 'Search' and 'Update' buttons from subgrid of jqGrid?

I am looking for jqGrid option that can hide 'Search' and 'Update' buttons of subgrid. (Marked in red circle)

enter image description here

Upvotes: 3

Views: 6090

Answers (2)

Raghbendra Nayak
Raghbendra Nayak

Reputation: 1646

You can use:

<table id="grid"></table>
<div id="pagination" ></div>
jQuery("#grid").jqGrid('navGrid','#pagination',{del:false,add:false,edit:false,search: false, refresh: false},{},{},{});

Upvotes: 1

Oleg
Oleg

Reputation: 221997

I suppose you use subgrid as grid feature of jqGrid. See on the demo example under "Advanced"/"Subgrid as Grid".

Inside of subGridRowExpanded you create explicitly new grid (as subgrid) and can optionally create navigator buttons with the line like

$("#" + subgrid_table_id).jqGrid('navGrid',
    "#" + pager_id, {edit: false, add: false, del: false});

So you should just remove the line or add additional options search: false and refresh: false.

Upvotes: 7

Related Questions