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

Radwindow maximized from within a radpageview

1 Answer 92 Views
Window
This is a migrated thread and some comments may be shown as answers.
Jody Harbour
Top achievements
Rank 1
Jody Harbour asked on 30 Jan 2013, 03:58 PM
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);

w.maximize();

w.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close);


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

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

w.maximize();

w.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close);


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().Close();
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??

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 31 Jan 2013, 11:54 AM
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);


Regards,
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.
Tags
Window
Asked by
Jody Harbour
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or