PDA

View Full Version : How to load a grid on the click of a tab



varsha
13 Jan 2011, 5:40 AM
Hello,

I am new to Sencha and to Extjs as well.

I want to load different grids on the click of tabs in TabPanel. I have tried the below code but it is not loading the grid, only simple text is being loaded.. Does anyone have faced the same situation?
Any kind of help is welcome !!

The code is -
var tabs2 =new Ext.TabPanel({
renderTo: document.body,
activeTab:0,
width:600,
height:250,
plain:true,
defaults:{autoScroll:true},
items:[{
title:'Tab 1',
autoLoad:'Html1.htm'
},{

title:'Tab 2',
autoLoad:{url:'http://localhost:8080/mocks/grid/dynamicGrid1.jsp'}
},{
title:'Tab 3',


autoLoad



:{url:'http://localhost:8080/mocks/grid/dynamicGrid2.jsp'}

}]
});