Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery Jqgrid客户端排序和服务器端分页_Jquery_Asp.net_Web_Service_Jqgrid - Fatal编程技术网

Jquery Jqgrid客户端排序和服务器端分页

Jquery Jqgrid客户端排序和服务器端分页,jquery,asp.net,web,service,jqgrid,Jquery,Asp.net,Web,Service,Jqgrid,如何在Jgrid中实现客户端排序和服务器端分页 输出为Json响应容器1000条记录中的10条。所以我的问题是,我只想对当前页面上显示的10条记录进行排序。并非所有记录都应排序 请查找以下代码: jQuery("#SubConGrid").jqGrid({ datatype: '', height: 230, width: 300, colNames: ['SubcontractorID', 'Name', 'Type', 'RCBCode'],

如何在Jgrid中实现客户端排序和服务器端分页

输出为Json响应容器1000条记录中的10条。所以我的问题是,我只想对当前页面上显示的10条记录进行排序。并非所有记录都应排序

请查找以下代码:

    jQuery("#SubConGrid").jqGrid({
    datatype: '',
    height: 230,
    width: 300,
    colNames: ['SubcontractorID', 'Name', 'Type', 'RCBCode'],
    colModel: [
    { name: 'SubcontractorID', index: 'SubcontractorID', width: 100, sortable: false, hidden: true },
    { name: 'Name', index: 'Name', width: 200, sorttype: "text", formatter: 'showlink', formatoptions: { baseLinkUrl: 'javascript:', showAction: "SelectContractor('", addParam: "');"} },
    { name: 'Type', index: 'Type', sorttype: "text", width: 50 },
    { name: 'RCBCode', index: 'RCBCode', width: 50, sorttype: "text" },
],
    multiselect: false,
    caption: "SubContractor",
    pager: jQuery('#pageNavigation'),
    viewrecords: true,
    scrollrows: true,
    shrinkToFit: true,
    rowNum: 10,
    sortable: true,
    sortname: 'Name',
    sortorder: 'desc',
    rowList: [10, 15, 20],
    pgbuttons: true,
    pgtext: "Page {0} of {1}",
    altRows: true,
    onPaging: function (pgButton) {
        GetSearchData();
    }
});



function GetSearchData() {
  PageMethods.GetSubContractorSearch( $("#SubConGrid").getGridParam("page"), 
                 $(".ui-pg-selbox").val(), onGetListSuccess, onError);
}

抱歉,标题是Jqgrid