View Full Version : Store data and grid issue

8 Feb 2014, 10:03 PM
I created a user maintenance window, there is a grid in it to show user's role. And a store links to this grid. I created all of them by using Sencha Architect, so I didn't write any code manually.
But something very interest happens. When I open the same window twice or more. If one grid contains data, they also show in all other opened window. Data is also updated altogether if I update in one window. Looks like all grid are using one store data. No new store instance is created when I open a new window.

I uploaded a picture here, hope can let you know my problem much clear. Is there any thing I missed to set? Kindly help, thanks

9 Feb 2014, 11:37 PM
As you are using same instance of grid and store in Window container , so on updating a value in a grid, will reflect the same in all the grid . You can create different instance of grid and store. Pass the same to your window container

While setting the store property in your grid, create the instance of a store ('Ext.create(app.store.Mystore')

var gridObj = Ext.create('app.view.MyGrid');
pass this object as a item to your Window container.

Hope this may help you