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
Javascript 使用Ext.grid.plugin.CellEditing编辑后远程保存onblur_Javascript_Extjs_Cell_Gridpanel - Fatal编程技术网

Javascript 使用Ext.grid.plugin.CellEditing编辑后远程保存onblur

Javascript 使用Ext.grid.plugin.CellEditing编辑后远程保存onblur,javascript,extjs,cell,gridpanel,Javascript,Extjs,Cell,Gridpanel,我需要将请求(商店正在使用restproxy)发送到我的服务器onblur。我已经有了save方法,可以通过按钮调用它 这是我的手机编辑 var cellEditing = Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1, }); grid.plugins = [cellEditing]; grid.on('edit', function(editor, e) { /

我需要将请求(商店正在使用restproxy)发送到我的服务器onblur。我已经有了save方法,可以通过按钮调用它

这是我的手机编辑

var cellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
        clicksToEdit: 1,
    });

    grid.plugins = [cellEditing];
    grid.on('edit', function(editor, e) {
        // commit the changes right after editing finished
        e.record.commit();
        e.grid.store.save();

    });
我在官方文件中读到,这是必需的事件,但在我看来,它是在编辑之前被触发的

简言之
  • 编辑单元格后,我必须绑定的事件是什么
  • 使用
    e.grid.store.save()发送请求可以吗

  • 问题是调用两个方法
    commit
    save

    record.commit正在清除
    dirty
    标志,因此store.save找不到任何要同步的内容

    工作样本:

    var cellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
            clicksToEdit: 1,
        });
    
        grid.plugins = [cellEditing];
        grid.on('edit', function(editor, e) {
            // commit the changes right after editing finished
            e.grid.store.save();
    
        });