PDA

View Full Version : gridpanel show



genius551v
11 May 2007, 8:19 AM
Hi,

i have this:


addGrid : function(){
var gri = GridUI.init();

var newpanel = 'grid1';
//if not exist and cant show, create a new panel. i suppose??
if (!innerLayoutCenter.showPanel(newpanel)) {
var newiframe = new Ext.GridPanel(gri, {id: newpanel, title: 'grid-1'});
innerLayoutCenter.add('center', newiframe);
}
innerLayout.getRegion('center').getActivePanel().setTitle('grid-1');
}


this always create the panel, why?

genius551v
12 May 2007, 4:54 PM
no one????

jsakalos
12 May 2007, 5:50 PM
What are you trying to achieve? I just cannot understand it just from that code fragment. What does GridUI.init() do?

You see, it's always very good if you briefly describe the goal you're heading to, the specific problem and if you post complete code fragment necessary for others to understand.