小编Gru*_*nik的帖子

在jqGrid中在加载时触发客户端过滤

我正试图让JqGrid在完成数据加载后立即进行客户端过滤(和排序).我可以正确设置搜索字段,但调用TriggerToolbar()似乎没有任何效果.

$("#list").GridUnload();
        var mygrid = $("#list").jqGrid({
            url: '@Url.Action("GetSearchCriteriaWithNoComponents", "SearchCriteria")',
            postData: { BookingSiteId: function () { return $("#BookingSiteId option:selected").val(); }, MethodId: function () { return $("#MethodId option:selected").val(); } },
            datatype: 'json',
            mtype: 'Post',
            colNames: ['Id', 'PID', 'Ori', 'Dest', 'Conn', 'Pos', 'Method', 'Billing', 'Filter', 'Pattern', 'Class', 'Wildcard', 'Components', 'Comment'],
            colModel: [
          { name: 'Id', index: 'Id', width: 30, hidden: true },
          { name: 'PID', index: 'PID', width: 35 },
          { name: 'Ori', index: 'Ori', width: 35 },
          { name: 'Dest', index: 'Dest', …
Run Code Online (Sandbox Code Playgroud)

filtering client-side jqgrid load-time jqgrid-asp.net

4
推荐指数
1
解决办法
3381
查看次数