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

How to resize parent RadWindow according to the Popup Window

2 Answers 72 Views
Window
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 02 Nov 2010, 09:05 PM
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 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 03 Nov 2010, 08:05 AM
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.
0
Georgi Tunev
Telerik team
answered on 03 Nov 2010, 09:00 AM
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
Tags
Window
Asked by
Martin
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Georgi Tunev
Telerik team
Share this question
or