function initGrid() {
localGrid = jQuery("#tbList");
localGrid.jqGrid({
data: localData,
datatype: "local",
gridview: true,
height: ,
width: '90%',
rowList: [,],
colNames: innerColumns,
autowidth: true,
hoverrows: false,
multiselect: false,
colModel: [
{ name: 'Id', index: 'Id', width: , hidden: true },
{ name: 'Status', index: 'Status', width: },
{ name: 'GroupName', index: 'GroupName', width: },
{ name: 'LetterNumber', index: 'LetterNumber', width: , align: "center" },
{ name: 'ApplyUnitName', index: 'ApplyUnitName', width: , align: "center" },
{ name: 'StayDays', index: 'StayDays', width: , align: "center" },
{ name: 'LeaderName', index: 'LeaderName', width: , align: "center" } ],
emptyrecords: "没有任何数据",
pager: "#pager",
viewrecords: true,
rownumbers: true,
loadonce: true,
grouping: true,
rowNum:,
groupingView : {
groupField: ['Status']
},
ondblClickRow: function (id) {
//editInfo(id);
},
caption: "团组信息" }).navGrid('#pager', { edit: false, add: false, del: false, searchtext: "搜索" }, {}, {}, {}, { search: true, sopt: ['cn', 'eq', 'ge', 'gt', 'le', 'lt'] }); }

加载时只显示5条数据, 就是通过 rowNum:5 这一属性实现的,当然此时你最好也将 rowList 的最少值设为 5   我这里是rowList :[5,10]

05-06 22:51