Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Extjs Sencha编辑前比较值和行编辑中的编辑值_Extjs - Fatal编程技术网

Extjs Sencha编辑前比较值和行编辑中的编辑值

Extjs Sencha编辑前比较值和行编辑中的编辑值,extjs,Extjs,我需要将编辑前的值和更新后的值与行编辑器更新进行比较。并且我需要只使用编辑后的值将json字符串发送到后端。请让我知道最好的方法 谢谢。您附加到网格的编辑事件并收集所有更改的值 var changes = []; grid.on('edit', function(editor, context) { var originalValue = context.value; var newValue = record.get(context.field); if ( orig

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


谢谢。

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

var changes = [];

grid.on('edit', function(editor, context) {
    var originalValue = context.value;
    var newValue = record.get(context.field);
    if ( originalValue !== newValue ) {
        changes.push(context);
    }
});

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

var changes = [];

grid.on('edit', function(editor, context) {
    var originalValue = context.value;
    var newValue = record.get(context.field);
    if ( originalValue !== newValue ) {
        changes.push(context);
    }
});

是否在后端实现了可用于发送更改的服务,或者您正在请求绿地解决方案?是否在后端实现了可用于发送更改的服务,或者您正在请求绿地解决方案?