PDA

View Full Version : Question about tabs and grids



danrog
14 Oct 2010, 12:24 PM
I have a tree, and a tabpanel. When you click on a child in the tree a new tab opens up with a grid populated with data based on the ID of the child. This works great (and was very easy to setup). However, the tabs dont always behave properly. Either the entire grid of some of the other tabs disappear, or the data is that of another grid. What I want to know is, A) can this be done and B) is it as simple as creating a new instance of the grid (which I thought would have a new instance of the store too) as I did here, OR is it not that simple?



tabs.add({
id: subid,
title: subnet,
closable: true,
layout: 'fit',
items: [{
border: false,
layout: 'fit',
items:[ new Ext.grid.GridPanel(grid) ]
}]
}).show();




P.S. I must say ExtJS is awesome!
P.S.S I've searched the forums and other sources but couldn't find anything that pertained to my question.