有两个网格具有相同的存储(商店名称)但有两个不同的实例

时间:2022-09-22 16:19:05

I have two grids:

我有两个网格:

xtype: 'grid',
id: 'grid1',
store: Ext.create(SomeStore)

xtype: 'grid',
id: 'grid2',
store: Ext.create(SomeStore)

The store has autoLoad to false and I'm loading the data from the init function:

商店的autoLoad为false,我正在从init函数加载数据:

this.grid.store.load({some, parameters, for, loading});

When I load the first grid, everything is great, but when I load the second grid, the first grid has the same data as the second (changed). So, basically it means that I don't have the 2 different instances of the SomeStore. How can I create them?

当我加载第一个网格时,一切都很好,但是当我加载第二个网格时,第一个网格与第二个网格具有相同的数据(已更改)。所以,基本上它意味着我没有SomeStore的2个不同实例。我该如何创建它们?

They are not created with the storeId but with the full name.

它们不是使用storeId创建的,而是使用全名创建的。

1 个解决方案

#1


1  

Solved it. I've added the whole grid dynamically to a panel inside my init function and it worked.

解决了它。我已经将整个网格动态添加到我的init函数内的面板中并且它工作正常。

#1


1  

Solved it. I've added the whole grid dynamically to a panel inside my init function and it worked.

解决了它。我已经将整个网格动态添加到我的init函数内的面板中并且它工作正常。