初始化加载数据

 

$("#jqGrid").jqGrid({
                url: 'CCProjectileInfo.aspx?Action=GetInBillList',
                //url: 'http://trirand.com/blog/phpjqgrid/examples/jsonp/getjsonp.php?callback=?&qwery=longorders',
                mtype: "GET",
                styleUI: 'Bootstrap',
                datatype: "json",
                postData: { UserID: userId },
                colModel: [
                    //{ label: '交流类型', name: 'ID', key: true, width: 200 },
                    { label: '交流类型', name: '', width: 200, formatter: function (value, grid, rows, state) { return "Inbound交流记录" } },
                    { label: '处理时间', name: 'CreateDate', width: 170, formatter: function (value) { return value.replace("T", " ") } },
                    { label: '处理账号', name: 'CreateBy', width: 100 },
                    { label: '反馈内容', name: 'FromContent', width: 300 },
                    { label: '回馈内容', name: 'ToContent', width: 300 },
                    { label: '操作', name: '', width: 100, formatter: function (value, grid, rows, state) { return "<a href=\"javascript:void(0)\" style=\"color:#f60\" onclick=\"ShowBoundInfo(" + rows.ID + ",1)\">查看</a>" } }
                ],
                viewrecords: true,
                height: 250,
                rowNum: 20,
                rowList: [10, 20, 50, 100], //每页记录数可选列表  
                pager: "#jqGridPager"
            });
View Code

相关文章: