我jqGrid
的显示了,但它没有显示数据我检查了 json 源,没关系
$(document).ready(function () {
$("#grid").jqGrid(
{
url: 'GetDepartment',
datatype: 'json',
mtype: 'GET',
colNames: ['Department ID', 'Department Name'],
colModel: [
{ name: 'DepartmentID', index: 'DepartmentID' },
{ name: 'DepartmentName', index: 'DepartmentName'}
],
pager: $("#GridPager"),
rowNum: 2,
rowList: [5, 10, 15, 20],
width: 'auto',
sortname: 'DepartmentID',
sortorder: "ASC"
})
$("#grid").jqGrid('navGrid', '#GridPager', { add: false, edit: false, del: false, search: false})
})