【发布时间】:2019-12-11 08:20:40
【问题描述】:
我像这样使用 Jqgrid:
$("#grdMain" + TabID).jqGrid({
datatype: 'local',
colNames: ['ID', 'LookupCode','LookupTitle'],
colModel: [
{ name: 'ID', index: 'ID', hidden: true, editable: true, dataType: "number" },
{ name: 'LookupCode', index: 'LookupCode', hidden: true },
{ name: 'LookupTitle', index: 'LookupTitle', width: 100 }],
localReader: {
repeatitems: false,
cell: "",
id: "ID"
},
scrollOffset: 20,
rowNum: 20,
rowList: [10, 20],
sortorder: 'asc',
viewrecords: true,
autowidth: false,
gridview: true,
forceFit: false,
shrinkToFit: false,
multiselect: true,
width: 1255,
height: 340,
editurl: 'clientArray',
rowNum: 1000000,
direction: 'rtl',
caption: '',
gridstate: 'hidden',
rownumbers: true,
loadError: ServiceFailed,
onSelectRow: function (rowid, isSelected) {
$(this).editRow(rowid, true);
$("#" + rowid + "_LookupTitle", "#grdMain" + TabID).lookup();
},
beforeSelectRow: function (rowid, e) {
return DetailGridUtility.SaveDetail($(this), rowid, LastID);
}, onSelectAll: function (ids, status) {
}
});
假设网格上有 10 行,我选择了 2 个第一行,第二行处于编辑模式,我更改了 lookupTitle(并且行仍处于编辑模式),现在我单击“全选复选框”,然后更改为第二行处于编辑模式的不被考虑
我该如何解决这个错误?
selectAll 之前有方法吗? (如果有,我可以为 SellectAll 保存更改)
【问题讨论】:
-
使用哪个版本的 jqGrid - Guriddo jqGrid、free-jqGrid 或 jqGrid
-
我用的是4.4.1版
-
关于可编辑字段的第二个问题呢?当您选择一行时,函数查找是什么?如果您想获得帮助,请回答所有问题