PDA

View Full Version : Grid between Two Panels



chichasonu
8 Jan 2016, 11:12 AM
Hi,
I have two panels initially rendered inside a main panel.Now upon selection the combo box in panel1,their should be a grid inserted between the two panels.
Can some one suggest on how to achieve this.
Thanks in Advance

Gary Schlosberg
8 Jan 2016, 3:09 PM
Are you using an hbox layout for your panels? Perhaps you could have the grid's panel hidden between the visible panels until you want to display it?

jdkhamba
8 Jan 2016, 3:51 PM
Or you could just insert it in correct location, In your case, index 1 :

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

chichasonu
10 Jan 2016, 9:45 PM
The way inserting the component at a particular index,can i remove the component at the particular index.

jdkhamba
11 Jan 2016, 5:01 AM
Yes. Call remove :-)

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

But in this case you have to access the component you want to remove instead of doing that by index.