This is a migrated thread and some comments may be shown as answers.

OnClientClose is not called 3rd time window is closed

1 Answer 77 Views
Window
This is a migrated thread and some comments may be shown as answers.
Jorid
Top achievements
Rank 1
Jorid asked on 27 May 2008, 01:55 PM
Hi,

Short description of my problem:
I have an radwindow witch open a radWindow inside. When the top modal window is closed I want to call a javascript method.

function RwMyRw_Close(value)  
{  
    alert('hello');  
}  
 
<telerik:RadWindowManager runat="server" ID="rdWndMgr"  Skin="Office2007"             
        VisibleTitlebar="true" EnableViewState="true" UseClassicWindows="false" InitialBehavior="close" > 
    <Windows> 
        <telerik:RadWindow   
            ID="rwMyRw" runat="server" ReloadOnShow="true" Behavior="close"                 
            VisibleTitlebar="true" Height="550px" Width="600px" Modal="true" 
            NavigateUrl="test.aspx" 
            OnClientClose="RwMyRw_Close" /> 
     </Windows> 
     </telerik:RadWindowManager> 
 
 

First time I open and close the modal window it works ok, second time the same, but the third time it stops working. Same behavior every time.

Any idea why?

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 29 May 2008, 11:16 AM
Hello Jorid,

I already answered your other thread and for your convenience I am pasting the answer below:

Thank you for the provided code.

In order to achieve the desired behavior and your setting to take effect you should put in the RadWindowManager's declaration instead of the RadWindow's one as shown below:

  <telerik:RadWindowManager runat="server" ID="rdWndMgr" Skin="Office2007" VisibleTitlebar="true" 
            EnableViewState="true" UseClassicWindows="false" InitialBehavior="close" OnClientClose="RwMyRw_Close">  
            <Windows> 
                <telerik:RadWindow ID="rwMyRw" runat="server" ReloadOnShow="true" Behavior="close" 
                    VisibleTitlebar="true" Height="550px" Width="600px" Modal="true" NavigateUrl="test.aspx" /> 
            </Windows> 
        </telerik:RadWindowManager> 

You can find more information about hooking up RadWindow's client events here.

Regards,
Svetlina
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Window
Asked by
Jorid
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or