Answers for "jqgrid set filter programmatically"

0

jqgrid set filter programmatically

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");
    }
Posted by: Guest on May-27-2021

Code answers related to "jqgrid set filter programmatically"

Browse Popular Code Answers by Language