JQGrid与scoll分页和subgrid不能正常工作

时间:2015-12-11 23:10:17

标签: jquery jqgrid

我有一个带有子网格的jq网格并且它无法正常工作。在第一页(页面大小= 20)它工作正常,当我通过向下滚动第二页子网格工作但第一页子网格无法工作时加载第二页。当用户扩展第一页子网格时它的发送请求但它没有显示在后面的ui.No错误。我厌倦了旧的和最新版本的jqgrid,但仍然没有跟随我的网格。

$("#gridList").jqGrid({
        datatype:'local',
        colNames:['Col 1', 'Col 2', 'Col 3', 'Col 4', 'Col 5', 'Col 6', 'Col 7', 'Col 8',  'Col 9', 'Col 9', 'Col 10', 'Col 11','Col 12'],
        colModel:[
            {name:'Col1', width:50, sortable: false, align:'center', resizable: false},
            {name:'Col2', width:64, sortable: false, align:'center', resizable: false},
            {name:'Col3', width:50, sortable: false, align:'center', resizable: false},
            {name:'Col4', width:55, sortable: false, align:'center', resizable: false},
            {name:'Col5', width:130, sortable: false, align:'center', resizable: false},
            {name:'Col6', width:80, sortable: false, align:'right', resizable: false},
            {name:'Col7', width:80, sortable: false, align:'right', resizable: false},
            {name:'Col8', width:80, sortable: false, align:'right', resizable: false},
            {name:'Col9', width:80, sortable: false, align:'right', resizable: false},
            {name:'Col10', width:80, sortable: false, align:'right', resizable: false},
            {name:'Col11', width:80, sortable: false, align:'right', resizable: false},
            {name:'Col12', width:80, sortable: false, align:'right', resizable: false},
            {name:'Col13', index:'select', align:'center', width:80,}],
        width: 500,
        shrinkToFit:false,
        height: "470",
        scroll : true,
        rowNum : 20,
        rownumbers:true,
        loadtext: 'building list...'
        subGrid : true,
        subGridOptions: { 
            "plusicon" : "ui-icon-triangle-1-e",
            "minusicon" :"ui-icon-triangle-1-s",
            "openicon" : "ui-icon-arrowreturn-1-e",
            "reloadOnExpand" : false,
            "selectOnExpand" : true },
        subGridRowExpanded: function (subgridId, rowid) {
            var subgridTableId = subgridId + "_t";
            $("#" + subgridId).html("<table id='" + subgridTableId + "'></table>");
            $("#" + subgridTableId).jqGrid({
                datatype:'local',
                colNames: ['','Col 1','Col 2','Col 3','Col 4','Col 5'],
                colModel: [
                  {name: "&nbsp;", width:117, resizable: false},
                  {name: "Col1", width: 50, sortable: false, align:'center', resizable: false},
                  {name: "Col2", width: 55, sortable: false, align:'center', resizable: false},
                  {name: "Col3", width: 130, sortable: false, align:'center', resizable: false},
                  {name: "Col4", width: 165, sortable: false, align:'right', resizable: false},
                  {name: "Col5", width: 165, sortable: false, align:'right', resizable: false}
                ],
                height: "100%", 
                loadtext: 'building list...',
                jsonReader: {
                    repeatitems: false,
                },
                idPrefix: "s_" + rowid + "_", 
                jsonReader: {
                    repeatitems: false,
                }
            });

            fetchSubgridDetails(subgridId, rowid);
        },
        jsonReader: {
            repeatitems: false,
        } 
    });

0 个答案:

没有答案