How to resize parent RadWindow according to the Popup Window

3 posts, 0 answers
  1. Martin
    Martin avatar
    13 posts
    Member since:
    Nov 2010

    Posted 02 Nov 2010 Link to this post

    I have a RadWindow opened, and inside of this i open another radwindow. I want to resize the parent RadWindow, after popup radwindow is loaded. How can i achieve this behavior?
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 03 Nov 2010 Link to this post

    Hello Martin,


    Get reference to the parent RadWindow using the "GetRadWindow().BrowserWindow" property and resize the window according to your need. I hope the following documentation will shred some light on achieving the required.
    Calling Functions in Windows



    -Shinu.
  3. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 03 Nov 2010 Link to this post

    Hello Martin,

    What I would suggest in such scenario is to get a reference to the parent RadWindow and to call its setSize() methods.
    e.g. (in the context of the content page)
    function GetRadWindow()
    {
      var oWindow = null;
      if (window.radWindow)
         oWindow = window.radWindow;
      else if (window.frameElement.radWindow)
         oWindow = window.frameElement.radWindow;
      return oWindow;
    }   
     
    function showInternalWindow()
    {
        var oWnd = radopen("secondWinPage.aspx", "InternalRadWindow");
        var wrappingWindow = GetRadWindow();
        wrappingWindow.setSize(800, 400);
    }


    All the best,
    Georgi Tunev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top