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

Rad Window Resizing

2 Answers 62 Views
Window
This is a migrated thread and some comments may be shown as answers.
CHETAN JAITLY
Top achievements
Rank 1
CHETAN JAITLY asked on 19 Oct 2011, 01:13 PM
Hello,

I have to open rad window of small size which will just show progress icon and progress.... message
for that i have given size of rad window to by using below code in java script
ownd is rad window object .

oWnd.setUrl("Test.aspx",10,10);

but rad winodw is taking somw default height and not taking 10 whar i have given in above code  .

kindly advise

 

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 20 Oct 2011, 06:36 AM
Hello Chetan,

You can set the window size with the setSize method.
Javascript:
function ShowWindow()
 {
     var oWnd = $find("<%=RadWindow1.ClientID%>");
     oWnd. setSize(10, 10);
     oWnd.setUrl("Test.aspx");
     oWnd.show();
    }

Also take a look into the help document for more on RadWindow client object.
RadWindow Methods.

Thanks,
Shinu.
0
Marin Bratanov
Telerik team
answered on 21 Oct 2011, 11:06 AM
Hello guys,

Let me point out that there are certain limitations to the size of a RadWindow and such small dimensions are not supported.

The first is the height - an iframe nested in a table like it is in the RadWindow cannot be shorter than 150px (except for IE) and therefore dimensions lower than about 200px will not be taken if an external page is loaded. You can easily confirm this with the following markup:
<table style="height:80px;border:3px solid green">    
    <tr style="height:100%">    
        <td style="height:100%">    
            <iframe style="border: 1px solid red; height:100%" src=""></iframe>   
         </td>   
    </tr>   
</table>

As for the width - the RadWindow has an icon and several other buttons in its titlebar, and therefore its width cannot be smaller than theirs or else its design would break.

On the original post - the setUrl() method only takes one argument and you should not pass dimensions there, but to the setSize() method, as Shinu pointed out.

All the best,
Marin
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
CHETAN JAITLY
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Marin Bratanov
Telerik team
Share this question
or