lar*_*ole 4 asp.net-mvc jqgrid
我正在做类似这篇文章中的人:有没有办法在jquery jqgrid中以编程方式设置过滤器?
我正在使用http方法POST从我的MVC2项目中获取数据,我看到你可以使用GET这样添加一个参数:
You can modify the url that jqGrid calls, and add the filter option to the querystring, then handle it on the server side.
$(link).click(function(){
$(".mygrid").jqGrid('setGridParam',{url:"server.php?useMyFilter=1"})
});
Run Code Online (Sandbox Code Playgroud)
如何使用POST添加额外的过滤器参数?
对于这两个GET 和 POST你可以设置postData:
$(".mygrid").jqGrid('setGridParam',
{
url:"server.php",
postData: {
useMyFilter: 1
}
});
Run Code Online (Sandbox Code Playgroud)
请注意,您的来电jqGrid()缺少了;
| 归档时间: |
|
| 查看次数: |
2650 次 |
| 最近记录: |