我正在使用 jqgrid 和一个 asp.net mvc 3 应用程序。数据很好,导航网格是问题所在。图片说明了一切,只是没有正确显示。谢谢您的帮助!
<link href="../../Content/ui.jqgrid.css" rel="stylesheet" type="text/css" />
<script src="../../Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="../../Scripts/i18n/grid.locale-en.js" type="text/javascript"></script>
$("#list").jqGrid({
url: 'http://shah.localhost:3203/App/GetTables',
datatype: 'json',
mtype: 'GET',
jsonReader: {
repeatitems: false
},
colModel: [{
name: 'id',
label: 'Table Number',
width: 105
}, {
name: 'seatCount',
label: 'Seat Count',
width: 105
}, {
name: 'canCombine',
label: 'Combinable?',
width: 120
}],
rowNum: 10,
rowList: [10, 20, 30],
sortname: 'id',
sortorder: 'desc',
viewrecords: true,
gridview: true,
caption: 'My first grid',
pager: 'pager'
});
});
$("#list").navGrid('#gridpager', {
add: true
}, {}, {}, {}, {}, {
closeOnEscape: true
});
我的html标签:
<table id="list"><tr><td/></tr></table>
<div id="pager"></div>
图片: