Pirzada
Pirzada

Reputation: 4713

JQGrid filterToolbar row hidden when grid loads

Found the documentation here

http://www.trirand.com/jqgridwiki/doku.php?id=wiki:toolbar_searching

I want JQgrid filterToolbar blank top row in the grid hidden till the user use Toggle button to show. How do I do that?

myGrid.jqGrid('navGrid', '#pager', { add: false, edit: false, del: false },{}, {}, {}, { multipleSearch: true, overlay: false });
    myGrid.jqGrid('filterToolbar', { stringResult: true, searchOnEnter: true, defaultSearch: 'cn' });
    myGrid.jqGrid('navButtonAdd', '#pager',{ caption: "Filter", title: "Toggle Searching Toolbar",buttonicon: 'ui-icon-pin-s',onClickButton: function () { myGrid[0].toggleToolbar(); }});

Upvotes: 1

Views: 5054

Answers (2)

Smile
Smile

Reputation: 2758

This can also be achieved through below code snippet.

jQuery("ui-search-toolbar").hide();

Upvotes: 0

Oleg
Oleg

Reputation: 221997

It seems to me that you need just add one more line at the end of your code:

myGrid[0].toggleToolbar();

See the demo.

Upvotes: 3

Related Questions