Radwindow maximized from within a radpageview

2 posts, 0 answers
  1. Jody Harbour
    Jody Harbour avatar
    17 posts
    Member since:
    Feb 2009

    Posted 30 Jan 2013 Link to this post

    I have a RadTabStrip + RadMultiPageView + RadPageView + RadWindow on mainpage.aspx

    RadPageView  I am utilizing contenturl='contentpage.aspx'

    I am wanting to do the following call on contentpage.aspx

    var w = radopen('dialogpage.aspx', null);



    But this only sets it to full screen within the bounds of RadPageView.

    I cant do
    var w = parent.radopen('dialogpage.aspx', null);



    as I loose the ability to send requests back to the opening page utilizing:
    function GetRadWindow()
    var oWindow = null;
    if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;//IE (and Moz as well)
    return oWindow;
    function CloseAndRebind()
    GetRadWindow().BrowserWindow.UpdateFromPopup('information being passed back');

    UpdateFromPopup would be called on mainpage.aspx instead of contentpage.aspx
    any ideas on how to get the radwindow to maximize??
  2. Marin Bratanov
    Marin Bratanov avatar
    3908 posts

    Posted 31 Jan 2013 Link to this post

    Hello Jody,

    Any contorol is bound in the window object of its frame. In your case this is the iframe which the pageview creates for contentpage.aspx. Thus, a RadWindow cannot maximize outside of if it is created in it. This is a general browser behavior - frames provide context separation.

    What you can do to circumvent this:
    0) have a RadWIndowManager on the topmost page, the first one loaded in the browser
    1) open the RadWindow from the topmost page, i.e. var w = window.top.radopen(); so it is not bound in the iframe of the pageview and it can maximize to the full browser window
    2) in its object you can store a reference to the window object of the  contentpage.aspx, e.g.: w._actualParentPageReference = window;
    3) when you close it you can use this reference to call the desired function:  GetRadWindow ()._ actualParentPageReference.UpdateFromPopup(arguments);

    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top