PDA

View Full Version : [CLOSED] How to "clear" a dynamically loaded page in panel?



rthiney
Oct 01, 2013, 12:50 PM
Hi
I have a panel that I load a page dynamically when someone selects a value from a drop-down.
How can I "clear" the loaded page when someone selects a null value?

Daniil
Oct 01, 2013, 3:27 PM
Hi @rthiney,

It depends on what and how exactly you are loading into the Panel.

If you load Ext.NET components, then use:

App.Panel1.removeAll();


If you load some raw HTML or an iframe, then use:

App.Panel1.clearContent();

rthiney
Oct 01, 2013, 4:18 PM
Hi @rthiney,

It depends on what and how exactly you are loading into the Panel.

If you load Ext.NET components, then use:

App.Panel1.removeAll();


If you load some raw HTML or an iframe, then use:

App.Panel1.clearContent();

Thanks! Like a charm it worked!

Daniil
Oct 01, 2013, 4:53 PM
Good.

Please note if you will use the clearContent method if the first case (where the removeAll method should be used), then it will also clear the Panel, but components won't be properly destroyed.