1

This must be a stupid question, but I've been unable to find it.

I have an asp.net control that includes a RadWindowManager that has a child RadWindow. The RadWindow has the property NavigateUrl set to an asp.net page. I wish to have a Submit button that will do some server interaction and then close the RadWindow. The page that is the target of the NavigateUrl property doesn't have a reference to the window, which is the source of the problem.

Control

<asp:Content>
    <RadWindowManager>
        <RadWindow NavigateUrl="PageLocation">
    </RadWindowManager>
</asp:Content>

Page

<asp:Content>
    <telerik:RadButton Text="Submit" OnClick="CloseRadWindow"/>
</asp:Content>

How can I have a page with a button that can control the closing of its container (the RadWindow)?

kmkemp
  • 1,656
  • 3
  • 18
  • 21

1 Answers1

1

Try using self.close(); at the point where you want to close the RadWindow:

<telerik:RadButton ID="Submit" OnClientClick="self.close();return false;" ... />
James Johnson
  • 45,496
  • 8
  • 73
  • 110
  • I have a follow up question that I've ran into about the difference in using the client event handlers or invoking from my code behind: http://stackoverflow.com/questions/7757558/closing-radwindow-by-invoking-javascript-from-server – kmkemp Oct 13 '11 at 16:58