📌  相关文章
📜  jqgrid 以编程方式设置过滤器 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:24.742000             🧑  作者: Mango

代码示例1
var filters = { "groupOp": "AND", "rules": [{ "field": "id", "op": "eq", "data": "9" }, { "field": "amount", "op": "ge", "data": "10" }, { "field": "name", "op": "cn", "data": "do i"}] };

//To filter:
jqGridFilter(filters , $('#myGrid'));

//To reset: 
jqGridFilter(null, $('#myGrid'));

    function jqGridFilter(filtersparam, grid) {
        grid.setGridParam({
            postData: {
                filters: filtersparam
            },
            search: true
        });
        grid.trigger("reloadGrid");
    }