Close RadWindow from within itself

2 posts, 0 answers
  1. Clint MacDonald
    Clint MacDonald avatar
    32 posts
    Member since:
    May 2005

    Posted 26 Sep 2007 Link to this post

    How to Close a RadWindow from within itself.
    the tradition javascript: window.close() does not seem to work.  I also tried redirecting to another html page that does the same thing but no go.

    The examples show the source code for the parent page, but the the code on the radwindow page, so it is hard to follow though the path of the program execution.
  2. Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 27 Sep 2007 Link to this post

    Hello Clint,

    To close a RadWindow from within itself, you need to:
    1. get a backreference to the parent rad window
    2. call its close() method.


    function GetRadWindow()  
           var oWindow = null;  
           if (window.radWindow) oWindow = window.radWindow;  
           else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;  
           return oWindow;  
    function CloseWindow()  
            var oWindow = GetRadWindow();  

    As for the second part of your post, all dialogs are available in the C:\Program Files\telerik\RadControls 'Prometheus' for ASPNET Q2 2007\Live Demos\Window\Examples's subfolders. You can also see the source of the dialogs by right-clicking on them and choosing View Source from the context menu.

    I hope this helps.

    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft R3 2016 release webinar banner
Back to Top