【发布时间】:2018-06-25 18:40:51
【问题描述】:
我有一个启用了 CellEditing 的网格,当我单击“保存”时,我想捕获用户更改的所有内容。
我尝试使用getUpdatedRecords 和getModifiedRecords,但都没有正确填充。
如何正确实现这些方法?
代码
...
saveGrid: function () {
var controller = this,
accManagerStore = Ext.getStore('Management'),
modifiedRecords = (accManagerStore && accManagerStore.getUpdatedRecords()),
modifiedRecords2 = (accManagerStore && accManagerStore.getModifiedRecords()),
testDataWindow = controller.view,
activeRec = controller.activeRecord,
assetId = (activeRec && activeRec.get('assetId')),
resultsArray = [];
this.getAccountManagementGrid().getStore().sync();
},...
控制台
modifiedRecords: []
length: 0
__proto__: []
modifiedRecords2: []
length: 0
【问题讨论】:
-
已经有一段时间了,但我认为您必须说 UpdateRecord 才能将更改从您的表单推送回您的记录。
标签: javascript extjs extjs4.2