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

[Solved] Setting A Rad Window size from the Rad Window

1 Answer 103 Views
Window
This is a migrated thread and some comments may be shown as answers.
sidcom
Top achievements
Rank 1
sidcom asked on 17 Jun 2008, 01:05 PM
Hi there

Is there a way to set the size of a rad window from within the rad window. I have been looking at the examples and they all seem to be setting the size from the calling window.

I would like to set the rad window to the size of the document contained within it but to do that i need to wait for the document to be loaded before i can work out it's size.

Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 18 Jun 2008, 07:20 AM
Hi sidcom,

In order to achieve the desired behavior you should first obtain a reference to the RadWindow client object by using the following javascript function:

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

After that you can use the RadWindow's client-side methods to manipulate it, e.g. GetRadWindow().setSize(200, 200).

Kind regards,
Svetlina
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Window
Asked by
sidcom
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or