Rad Window Resizing

3 posts, 0 answers
  1. CHETAN JAITLY
    CHETAN JAITLY avatar
    16 posts
    Member since:
    Jan 2009

    Posted 19 Oct 2011 Link to this post

    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. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 20 Oct 2011 Link to this post

    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.
  3. Marin Bratanov
    Admin
    Marin Bratanov avatar
    4626 posts

    Posted 21 Oct 2011 Link to this post

    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
Back to Top