有没有办法以编程设置的jQuery jqGrid的一个过滤器? [英] is there a way to programatically set a filter in jquery jqgrid?

查看:266
本文介绍了有没有办法以编程设置的jQuery jqGrid的一个过滤器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有在顶部上有一个的jqGrid带过滤行的页面。我想有一个加载该网格页另一个页面上,但与一列设置过滤器的链接。是可以从一个链接或任何其他解决办法的人可以建议吗?

i have a page with a jqgrid on it with filter row at the top. I want to have a link on another page that loads this grid page but with a filter set on one of the columns. is that possible to do from a link or any other workaround people can suggest?

推荐答案

我解决了这个方式是在以下code传递:

the way i solved this was to pass in the following code:

var myfilter = { groupOp: "AND", rules: [] };
myfilter.rules.push({ field: "DataIssuesYN", op: "eq", data: "Y" });

然后在jqGrid的设置,我传入POSTDATA:

and then in the jqGrid setup, I pass into postData:

  postData: (myfilter) ? { filters: JSON.stringify(myfilter)} : {},

这篇关于有没有办法以编程设置的jQuery jqGrid的一个过滤器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆