There is no easy solution, except to create one store for each grid. If the reason you don't want to create multiple instances of the repository is to avoid multiple downloads, you could crack some kind of proxy level caching.
Edit Example of creating multiple repositories for your grids
You can create a storage instance (i.e. use Ext.create('My.Store') ) yourself in your grid's initComponent method:
Ext.define('My.Store', { extend: 'Ext.data.Store' ,fields: ['name'] ,proxy: { type: 'memory' ,reader: 'array' } ,data: [['Foo'],['Bar'],['Baz']] }); Ext.define('My.Grid', { extend: 'Ext.grid.Panel' ,columns: [{dataIndex: 'name'}] ,initComponent: function() {
Or you can specify a new store instance during creation:
Ext.create('Ext.grid.Panel', { renderTo: Ext.getBody() ,height: 200 ,columns: [{dataIndex: 'name'}] ,store: Ext.create('My.Store') // one instance }); Ext.create('Ext.grid.Panel', { renderTo: Ext.getBody() ,height: 200 ,columns: [{dataIndex: 'name'}] ,store: Ext.create('My.Store') // two instances! });
But as far as I know, I'm not at all worried about creating complete store definitions. I configure the proxy server in the model and use the built-in storage configuration using this model (the built-in configurations will be converted to their own instances, in Ext4). Example:
Ext.define('My.Grid', { extend: 'Ext.grid.Panel' ,columns: [{dataIndex: 'name'}]