当前位置: 动力学知识库 > 问答 > 编程问答 >

extjs - Having two grids with the same store (store name) but two different instances

问题描述:

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:

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?

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

网友答案:

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

分享给朋友:
您可能感兴趣的文章:
随机阅读: