本文介绍了如何通过外部按钮在jqGrid中打开搜索/查找对话框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有查找"按钮的jqGrid-这将弹出jqGrid的过滤器对话框,我可以在其中过滤东西-很酷.如何通过不属于jqGrid控件的按钮触发该对话框打开?

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?

我发现我可以这样做:$("#id").trigger('reloadGrid');告诉网格再次获取数据并重建jqGrid UI.是否有类似$("#id").trigger('openFindDialog');这样的东西?

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 $("#id").trigger('openFindDialog');?

推荐答案

jqGrid具有您需要使用的"> searchGrid 方法.要打开搜索对话框,您应该调用该方法并使用您可能从 navGrid :

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.

这篇关于如何通过外部按钮在jqGrid中打开搜索/查找对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 23:16