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

[Solved] Closing radwindow from target page

2 Answers 81 Views
Window
This is a migrated thread and some comments may be shown as answers.
Craig
Top achievements
Rank 1
Craig asked on 30 Oct 2007, 05:02 PM
Can I close the radwindow from within the page that the radwindow is displaying?  For example, I would like to put my "close" button in the content of the page that is being opened and have this close the radwindow.  Thank you for any suggestions.

2 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 31 Oct 2007, 08:03 AM
Hi cserold,

If you want to close the window from the dialog itself you will need first a backreference to the containing r.a.d.window and then you can use the Close() method to close the window.
e.g (in your dialog window):
  1. To get a backreference to the containing r.a.d.window, the following script should exist (be manually inserted) in the dialog page.

    function GetRadWindow()
    {
        var oWindow = null;
        if (window.radWindow) oWindow = window.radWindow;
        else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
        return oWindow;
    }
  2. The Close button closes the containing window like this:

    var oWindow = GetRadWindow();
    oWindow.Close();




All the best,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Craig
Top achievements
Rank 1
answered on 31 Oct 2007, 11:28 AM
Georgi,

Excellent.  Thank you for your help.  This worked great.

Craig
Tags
Window
Asked by
Craig
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Craig
Top achievements
Rank 1
Share this question
or