jqgrid:onchange 事件不适用于本地网格的选项卡

jqgrid : onchange event not working on tab for local grid

我正在使用具有以下属性的网格

cellEdit: true,
    datatype: 'json',
    viewrecords: true,
    cellsubmit: 'clientArray',
    loadonce: true

colmodel 有一列为:

{ name: 'Input', width: 120, editable: true, editoptions: { dataEvents: [
   { type: 'change', fn: function (e) {
            alert('hi');
           }
       },
      ]
    }
}

现在,当我在 Input 中输入一个值并单击其他单元格时,更改事件会触发,但是当我输入一个值并按 Tab 键时,它不起作用。

如果我正确理解你的问题,你应该像 beforeSaveCellbeforeSubmitCellafterSubmitCellafterSaveCell 那样使用 jqGrid callbacks of cell editing mode 而不是使用 change 事件.