1

我需要将编辑前的值和更新后的值与行编辑器更新进行比较。我需要将 json 字符串发送到后端,只包含编辑后的值。请让我知道最好的方法。

谢谢你。

4

1 回答 1

2

您附加到网格的编辑事件并收集所有更改的值

var changes = [];

grid.on('edit', function(editor, context) {
    var originalValue = context.value;
    var newValue = record.get(context.field);
    if ( originalValue !== newValue ) {
        changes.push(context);
    }
});
于 2013-07-15T15:13:55.723 回答