[英]In Ext JS 4 grid with CellEditing plugin how to modify programatically an adjacent cell
[英]remote save onblur after edit using Ext.grid.plugin.CellEditing
我需要將請求(商店正在使用restproxy )發送到我的服務器onblur 。 我已經有save方法可以通過按鈕調用此方法。
這是我的cellEditing
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找不到要sync
任何內容。
工作樣本:
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();
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.