View Full Version : ExtJs 3.2.1 Tab panel with multiple grids, each with their own store.

31 Mar 2014, 3:17 AM
I have a tab panel, with a button to create a new tab with a new grid. The new grid will have a cloned store of the first grid. I have a button to create a new row (add asset) within each tab (in a toolbar). However I'm not sure how i can return the grid for the active tab, so that i can return the store for the button to use. Ideally i'd like to change the store variable with the active grid store whenever i change tab, or add a new one.

Could i use the 'tabchange' event for this?

var tabs = new Ext.TabPanel({
renderTo: 'grid',
items: [grid],
width: 1000,
height: 500,
activeTab: 0,
plugins: ['tabtitleedit'],
listeners: {
'tabchange': function (tabPanel, tab) {
var activeTabIndex = tabPanel.items.findIndex('id', tab.id);