【发布时间】:2015-03-27 09:22:36
【问题描述】:
在 Dgrid 0.3.16 中,我使用的是 Observable 存储,当我在存储中的数据发生更改时,我调用了存储通知函数。 (不是 'put',因为我只需要 UI 更新,这是特定情况)
store.notify(object, existingId);
我现在已将 Dgrid 升级到 0.4 版,并且我使用 'dstore' 作为商店。商店是这样创建的:
var store = new declare([ Rest, SimpleQuery, Trackable, Cache, TreeStore ])(lang.mixin({
target:"/ac/api?fetchview",
idProperty:"$uniqueid",
useRangeHeaders: true
}, config));
store.getRootCollection = function (parent, options) {
return this.root.filter({parent: parent.$position},options);
};
store.getChildren = function (parent, options) {
return this.root.filter({parent: parent.$position},options);
};
store.mayHaveChildren = function (item) {
return item.$iscategory;
};
this.collection = store;
如果更改了一行而不调用“put”,我如何通知商店?我需要 dGrid 重新渲染该行。
【问题讨论】: