我正在尝试使用寻呼机的正确性,但是好像我将loadonce设置为“ true”:则我无法更新网格(需要刷新页面以查看更改),但是分页有效并且如果将其设置设置为“ false”,那么我只能看到10条记录,无法更改为第2页。
jQuery("#jqgrid").jqGrid({
url: 'DeviceAdministration/getDevices',
datatype: "json",
contentType: "application/json; charset-utf-8",
mtype: 'GET',
height: '270',
scroll: false,
colNames: [ 'id', "@SmartAdminMvc.Resource.Global.DeviceIdentifier", "@SmartAdminMvc.Resource.Global.DeviceSerialNumber", "@SmartAdminMvc.Resource.Global.DisplayName", "@SmartAdminMvc.Resource.Global.DeviceName", "@SmartAdminMvc.Resource.Global.DeviceDescription","@SmartAdminMvc.Resource.Global.Name","@SmartAdminMvc.Resource.Global.Model","@SmartAdminMvc.Resource.Global.Platform","@SmartAdminMvc.Resource.Global.VersionString", "@SmartAdminMvc.Resource.Global.Insdate", "@SmartAdminMvc.Resource.Global.Upddate", "@SmartAdminMvc.Resource.Global.Manufacturer", "@SmartAdminMvc.Resource.Global.Idiom"],
colModel: [
{
name: 'id',
index: 'id',
sortable: true,
sorttype: 'number',
hidden:true,
},
{
name: 'deviceIdentifier',
index: 'deviceIdentifier',
editable: true,
editrules: {
edithidden: true, required: true, custom: true, custom_func: globalMobileServicesTableLibrary.LongCheck255
},
sortable: true,
}, {
name: 'deviceSerialNumber',
index: 'deviceSerialNumber',
editable: true,
editrules: {
edithidden: true, required: true, custom: true, custom_func: globalMobileServicesTableLibrary.LongCheck255
},
sortable: true,
hidden: true
}, {
name: 'displayName',
index: 'displayName',
editable: true,
editrules: { edithidden: true, required: false, custom: true, custom_func: globalMobileServicesTableLibrary.LongCheck255 },
sortable: true,
}, {
name: 'deviceName',
index: 'deviceName',
editable: true,
editrules: { edithidden: true, required: false, custom: true, custom_func: globalMobileServicesTableLibrary.LongCheck255 },
sortable: false,
hidden:true
}, {
name: 'deviceDescription',
index: 'deviceDescription',
editable: true,
sortable: true,
},
{
name: 'name',
index: 'name',
editable: false,
sortable: true
}, {
name: 'model',
index: 'model',
editable: false,
sortable: true
},
{
name: 'platform',
index: 'platform',
editable: false,
sortable: true
}, {
name: 'versionString',
index: 'versionString',
editable: false,
sortable: true
},{
name: 'insdate',
index: 'insdate',
editable: false,
sortable: true,
sorttype: 'date',
formatter: globalMobileServicesTableLibrary.FormatterUTC,
hidden: true
},
{
name: 'upddate',
index: 'upddate',
editable: false,
sortable: true,
sorttype: 'date',
formatter: globalMobileServicesTableLibrary.FormatterUTC,
hidden:true
},{
name: 'manufacturer',
index: 'manufacturer',
editable: false,
sortable: true
}, {
name: 'idiom',
index: 'idiom',
editable: false,
sortable: true
}],
rowNum: 10,
pginput: true,
caption: 'Users',
pager: '#pjqgrid',
loadonce: true,
sortname: 'id',
toolbarfilter: true,
viewrecords: true,
sortorder: "asc",
gridComplete: function () {
},
onSelectRow: function (id) {
ClearOnlyLocalData(id);
if (id !== lastSel) {
lastSel = id;
}
},
editurl: "DeviceAdministration/editDevice",
caption: "@SmartAdminMvc.Resource.Global.DeviceTableCaption",
multiselect: false,
autowidth: true,
});
我想在一页上显示X条记录中的10条,然后能够切换到第二页并查看其他记录,依此类推。带有一个选项,可以编辑它们并直接看到结果而无需刷新页面。我知道它与负载有关,但我不确定如何更改它,以便能够同时进行页面改正和编辑。