Question about Window Destroy

  1. #1

    Question about Window Destroy

    Hi all,

    I having some issue with my app..

    I have one parent page where i create a window loading another aspx.. When i click on button to open is fine.. But how can i destroy complete this window when user click on close ou cancel button?

    If i close the window still exists and all typed fields still filled!!!

    How can i destroy complete this window???

    I change .hide() to .close() and still nothing

    btnCancelar.Listeners.Click.Handler = "parent.Ext.WindowMgr.getActive().close()";
  2. #2
    Hi rammus,

    You can set .CloseAction="Destroy" on your Window configuration properties.

    http://docs.sencha.com/ext-js/4-2/#!...fg-closeAction

    The default value in Ext.NET is "Close", which does not automatically destroy the Window and it's child Components. Setting to "Destroy" will remove the Window object and all child Components from the page.

    Hope this helps.
    Geoffrey McGill
    Founder
  3. #3
    Geof, thks for reply

    i set CloaseAction="Destroy" but now my window dont show again? I open the form and close.

    When i try to open again, nothing happens. I supposed the destroy is a complete remove from my form?? what can i do?

    <ext:Window ID="Cadastro" runat="server" Hidden="True" Height="703" Width="623" Resizable="False" Title="Cadastro de Usuario" TitleAlign="Center" CloseAction="Destroy">
                    <Loader Url="~/LovMatch/CadastroTab.aspx" Mode="Frame">
                        <LoadMask ShowMask="True"></LoadMask>
                    </Loader>
                </ext:Window>
  4. #4
    Correct. This is the desired behaviour of CloseAction="Destroy". Setting that property will destroy the object and remove all associated dom elements.
    Geoffrey McGill
    Founder
  5. #5
    ok, thks. i created the window by code behind on click event from my button and rendered with xrender.

    You can close this thread.

Similar Threads

  1. Replies: 3
    Last Post: Nov 28, 2012, 3:33 PM
  2. I Can't usage a Destroy Component ID Again.
    By Therruco in forum 1.x Help
    Replies: 3
    Last Post: Mar 01, 2012, 4:09 PM
  3. [CLOSED] Ext.Window: Question about clicking outside a modal Window
    By nhg_itd in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Feb 07, 2012, 6:00 AM
  4. [CLOSED] Destop Window Destroy load Problem
    By ogokgol in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 01, 2011, 5:41 AM
  5. [CLOSED] [1.0] HtmlEditor js error on destroy
    By jchau in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 20, 2010, 9:09 PM

Tags for this Thread

Posting Permissions