PDA

View Full Version : doLayout() not working



AJAIN32
23 May 2014, 2:31 AM
Hi,

I am trying to add some comboboxes in a container dynamically.

I have a container A having some fixed components in it. and based on some conditions i am trying to add some more component to it.
I have got reference of the container, items are also added and after that i am writing -
containerObj.doLayout();
Ideally when i excecute this the other components should be rendered but its not reflecting.

can anyone please tell me how can i achieve this ??

vardhan22
23 May 2014, 3:02 AM
You have to call dolayout() method of container in which you are adding elements. I assume, containerObj is the element which is added, and container A, is the parent container.

Generally, if layout is simpler, you need not to call doLayout at all. See the thread at

http://www.sencha.com/forum/showthread.php?226745-ExtJs-4.1-Is-calling-doLayout()-method-a-must-after-adding-child-to-a-parent

AJAIN32
25 May 2014, 10:20 PM
yes, it worked.

Thanks a lot !!!