jqGrid 数据加载完事件 loadComplete 使用

http://blog.csdn.net/u010690818/article/details/67633911

 

 

function gridList() {  
        var $gridList = $("#gridList");  
        $gridList.dataGrid({  
            url: "/Inv/SpuInvs/GetGridJson",  
            height: $(window).height() - 128,  
            colModel: [  
                { label: '主键', name: 'id', hidden: true },  
                {  
                    label: '货品编码', name: '', width: 140, align: 'center',  
                    formatter: function (cellvalue, options, rowObject) {  
                        return rowObject.codec+'\r'+rowObject.codes;  
                    }  
                },  
                { label: '货品条码', name: 'barcode', width: 140, align: 'center' },  
                { label: '品名', name: 'names', width: 120, align: 'left' },  
                 { label: '规格', name: 'spec', width: 140, align: 'left' },  
                  { label: '可销量', name: 'mode', width: 120, align: 'left' },  
            ],  
            pager: "#gridPager",  
            sortname: 'codes asc,create_time desc',  
            viewrecords: true,  
            loadComplete: function () {  
                //console.log('loadComplete');  
                var src = "ExPortPage?page=" + $gridList.jqGrid('getGridParam', 'page') + "&rows=" + $gridList.jqGrid('getGridParam', 'rowNum');  
                $("#index_page").attr("href", src);  
            }  
        });  
  
    } 

 

 

 

 

 

你可能感兴趣的:(Web)