I have a grid and 2 tabPanel. When i change the tab I reconfigure the colum model and I want to show the reconfigured grid. Is possibile?
As you can see there are 2 tab and 1 grid. In the second tab named 'two' I don't use the items property becouse in html a component can be rendered only one time. With this configuration the grid is not shown when I go in the second tab named "two"
Extjs 3.4 reuse same grid in two tabPanel
Code:
var tabPanel = new Ext.TabPanel(
{
renderTo: 'panel',
activeTab: 0,
items: [
{
itemId: bt,
title:'one',
items: grid
},
{
itemId: mlt
title:'two',
}],
listeners:
{
tabchange: function(panel, tab){
tab.itemId == mlt ? grid.reconfigure(grid.getStore(), mltColModel) : grid.reconfigure(grid.getStore(), btColModel);
}
}
});
As you can see there are 2 tab and 1 grid. In the second tab named 'two' I don't use the items property becouse in html a component can be rendered only one time. With this configuration the grid is not shown when I go in the second tab named "two"
Extjs 3.4 reuse same grid in two tabPanel
Aucun commentaire:
Enregistrer un commentaire