开发者

How to open search/find dialog in jqGrid from an external button?

I have a jqGrid which has a "find" button - this brings up the jqGrid's filter dialog where I can filter stuff - cool. How can I trigger that dialog to open from a button that is not a part of the jqGrid control?

I've found that I can do this: $("#id").trigger('reloadGrid'); to tell the grid to go get the data again and rebuild the jqGrid UI. Is there something similar, like $("#开发者_如何学Goid").trigger('openFindDialog');?


jqGrid has searchGrid method which you need to use. To open the searching dialog you should call the method and use any parameters or events which you probably knows from the previous usage of navGrid:

$("#id").jqGrid ('searchGrid', {multipleSearch:true, overlay: false});

How you can see here the code which are running on click on the "Search" button of the navigator is not much more as this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜