PDA

View Full Version : Tree and tabs



vishal058
20 May 2013, 8:34 PM
how to change theActive Tab By Click On Treepanel Item in ext js 4.0

Farish
20 May 2013, 10:53 PM
you can add an itemclick listener on your tree panel and then on the itemclick event, change the tab of the tabpanel:


treepanel.on('itemclick', function(view, record, item, index, e) {
// Here you know which record has been clicked and change tabs according to it
tabPanel.setActiveTab(1); // instead of 1, you can use the index of the tab or id or the component itself to which you want to switch
});

http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.tab.Panel-method-setActiveTab