Javascript 使用Ext.grid.plugin.CellEditing编辑后远程保存onblur
我需要将请求(商店正在使用restproxy)发送到我的服务器onblur。我已经有了save方法,可以通过按钮调用它 这是我的手机编辑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) { /
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();
});