I am looking for jqGrid option that can hide 'Search' and 'Update' buttons of subgrid. (Marked in red circle)
Asked
Active
Viewed 6,072 times
3
-
I'm not at work right now so i dont have the file on me at moment, but i can get you more info monday if thats ok. Anyway, you'll need to look for specific lines in the js file and alter them to suite your needs. I love jqgrid, and have actually fully modified the code to suite our customers needs including adding a hidable search to the top of the grid rather than going to the bottom. it's kinda annoying they dont make these things more accessable, but you really have 2 choices, fix it at the source, or create some later script to do more work to remove/hide these items at run time., – SpYk3HH Jan 21 '12 at 01:07
-
Of course i havn't updated to the newest version, and from what my roomie just told me, the newest version is supposed to have a the option to disable these menu items if needed. – SpYk3HH Jan 21 '12 at 01:08
-
SpYk3HH, thank you for response. I use the latest version of jqGrid and of course it would be better to find solution without editing source. – Yara Jan 21 '12 at 01:13
2 Answers
7
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
.

Oleg
- 220,925
- 34
- 403
- 798
-
Thank you a lot! Could you please specify where this options were mentioned in jqGrid documentation? – Yara Jan 21 '12 at 20:33
-
@Yara: You are welcome! The description of the parameters of `navGrid` function you can find [here](http://www.trirand.com/jqgridwiki/doku.php?id=wiki:navigator#parameters). – Oleg Jan 21 '12 at 21:22
1
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},{},{},{});
Raghbendra Nayak
- 1,606
- 3
- 22
- 47