PDA

View Full Version : Properly remove/delete/destroy component



Tuom Larsen
11 Jan 2011, 2:23 AM
Hello,

I added some items to a panel (".add()", ".doLayout()"). Now, I would like to "undo" it, so there is no trace left whatsoever. How to do it? I read a few threads here, that plain ".remove()" isn't enough as the component remains in DOM or HTML document? In other words, how to completely delete a component?

29unzz
11 Jan 2011, 3:00 AM
hi,
try this : Ext.getCmp('idControl').destroy(); ..... its 100% work for me.;)

Tuom Larsen
11 Jan 2011, 8:20 AM
And you calling ".remove()" as well? And what happens it [the panel] has some child components? Does ".destroy()" removes them too?

29unzz
18 Jan 2011, 6:53 PM
is there any dom or html still there?can u still get destroy ctl? i supposed to not larsen..