【问题标题】:ExtJs store datachanged event - How do we know which record got added\modified\updatedExtJs 存储 datachanged 事件 - 我们如何知道添加\修改\更新的记录
【发布时间】:2014-05-23 13:14:06
【问题描述】:

根据docs,DataChanged 事件被触发whenever the records in the Store have changed in some way - this could include adding or removing records, or updating the data in existing records

我的问题是我们如何知道添加\删除\修改了哪些记录。我们只获取存储引用作为参数。

【问题讨论】:

  • 你没有。 datachanged 是一个包罗万象的事件。监听特定事件(add/remove 等)。

标签: extjs extjs4.1 extjs-stores


【解决方案1】:

您不知道是哪个更改触发了 datachanged 事件,但是,您可以获得更改的记录:

this.getModifiedRecords();
this.getRemovedRecords();
this.getNewRecords();

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-10
    • 2015-11-22
    相关资源
    最近更新 更多