0

検索機能が動作していません。「_search=true」、「searchField=null」、「searchString=null」、「searchOper=null」のようなコントローラーパラメーターでアクションメソッドを 押すと、ここではsearchField、searchString、searchOperの値を取得していません。誰でも助けてください。

loadonce : trueプロパティを指定すると、検索が機能します。しかし、最初のページのレコードのみを取得しています。私は他のページレコードを取得していません。どうすればこれを修正できますか。

私のコード:

$(function () {

        $("#Channelslistgrid").jqGrid({
            colNames: ['ChannelName', 'Description',  'status'],
            colModel: [
                        { name: 'ChannelName', index: 'ChannelName', sortable: true, align: 'left', width: '200',
                            editable: false, edittype: 'text',search:true

                        },
                        { name: 'Description', index: 'Description', sortable: false, align: 'left', width: '120',
                            editable: false, edittype: 'text',search:true

                        },


                         { name: 'status', index: 'status', sortable: false, align: 'left', width: '220',
                             editable: false, edittype: 'text',search:true
                         },
                  ],
            pager: jQuery('#pager'),
            sortname: 'Title',
            rowNum: 15,
            rowList: [15, 20, 25],
            sortorder: "desc",
            height: 345,
            ignoreCase: true,
            viewrecords: true,
            rownumbers: true,
            caption: 'Channels List',
            width: 660,
            url: "@Url.Content("~/Home/Channelslist")",
            datatype: 'json',
            mtype: 'GET',
            loadonce: true

        })
        jQuery("#Channelslistgrid").jqGrid('filterToolbar', { searchOnEnter: true, enableClear: false });

    });

コントローラ

 public ActionResult Channelslist(int page, int rows, string sidx, string sord, bool _search, string searchField, string searchString, string searchOper)
        {
//code
}
4

1 に答える 1