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

RadWindow Cross Browser Size Problem..

5 Answers 131 Views
Window
This is a migrated thread and some comments may be shown as answers.
TSM
Top achievements
Rank 1
TSM asked on 14 Jun 2011, 02:38 PM
Hi ,
       I had a RadWindowManager and Radwindow in a Masterpage.I used to open Radwindow where ever
       i needed using below script.

    function OpenRadWindow() {
            var parentWindow = radopen("MyPage.aspx", "rwTest");
            parentWindow.setSize(400, 160);
            parentWindow.SetTitle("Test RadWindow");
            return false;
        }

and this is my design.

 <telerik:RadWindowManager ID="RadWindowManager1" Style="z-index: 10000" runat="server"
            VisibleStatusbar="false" Modal="true"  Behaviors="Close,Move"
            ShowContentDuringLoad="false">
            <Windows>
                <telerik:RadWindow ID="rwTest" runat="server" VisibleTitlebar="true" VisibleStatusbar="false">
                </telerik:RadWindow>
            </Windows>
  </telerik:RadWindowManager>

I have used the  setSize(400, 160) to set the size.My problem is  RadWindow is opened in different sizes
in different browsers.Only in IE8 i can set the width and height correctly.In other browsers size differs.
I have also tried set_width and set_height,but of no use.Can anyone help me how to set size of Radwindow
same among all  browsers.

Also can any one tell me how to set image for RadWindow from clientside,because im using same Radwindow
for my all needs and i cannot set ImageUrl for RadWindow itself.I have referred the below url

http://www.telerik.com/help/aspnet-ajax/window-programming-radwindow-methods.html

and in that i cannot find a way to setimageurl by using something like parentWindow.SetImageUrl("Image.png");
Please help me....


Regards and Thanks,
Titti Skaria.







5 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 15 Jun 2011, 12:24 PM

Hello Titti,

This behavior is observed because there is a limitation to the height of an iframe in all browsers, but IE, and the RadWindow's content is actually an iframe when an external page is loaded. That being said we have taken into account this browser limitation and the height of the RadWindow is limited in non-IE browsers.

You can reproduce the same issue with no complex controls at all:

<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>

What I would suggest is that you do not set content with heights smaller than 150px (while the height you set is for the entire window, which includes titlebar, resize handles, statusbar).

If you want to have a smaller RadWindow you could use its ContentTemplate and add the controls directly there, instead of using an external page.

On a side note - you could set this size declaratively in the markup instead of using JavaScript if it is the same in all (or most) of the cases.

As for your second question - there is a method that sets the icon of the RadWindow, set_iconUrl(). Please accept our apologies for the omission in the documentation. It is a bit out of date and we are currently in the process of upgrading it. The catch in using it is that this icon must be set before the window is shown, or you would need to force it to redraw by calling the show() method again after you set the icon:

var parentWindow = radopen("MyPage.aspx", "rwTest");
parentWindow.setSize(400, 160);
parentWindow.SetTitle("Test RadWindow");
parentWindow.set_iconUrl("http://cdn.last.fm/flatness/favicon.2.ico");
parentWindow.show();


Kind regards,
Marin
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
TSM
Top achievements
Rank 1
answered on 16 Jun 2011, 07:33 AM
Hi Marin ,
                 Thank you very much for your kind reply..The set_iconUrl works perfectly for me.But regarding
RadWindow size i have tried setting Width and Height in RadWindow design itself and also in clientside
(Height's more than 150 as you said) and still having problem mainly in Opera.In remaining other browsers
 there is not much difference i can see.Using ContentTemplate works perfectly for me in all browsers.
My problem is my RadWindowManager and RadWindow is in Master page and i have to register each and every UserControls (Both Small and Big) in Masterpage itself and have to use it inside RadWindow's ContentTemplate.
I dont want this to happen also because whole page content and ViewSource will increase due to this.Also in the
example you have shown using iframe i have used min-height to make it work for all browsers.

 <iframe style="border: 1px solid red; overflow: hidden; height: 150px; border: 3px solid green;
        max-height: 500px; min-height: 150px;" src="">

This is the design i have used by setting width and Height in RadWindow itself.(As said)
(On a side note - you could set this size declaratively in the markup instead of using JavaScript if it is the same in all (or most) of the cases.)

<telerik:RadWindowManager ID="RadWindowManager1" Style="z-index: 10000" runat="server"
        VisibleStatusbar="false" Modal="true" Skin="Windows7" Behaviors="Close,Move"
        ShowContentDuringLoad="false">
        <Windows>
            <telerik:RadWindow ID="rwTest" runat="server"  Width="400px"
                Height="300px" VisibleTitlebar="true" VisibleStatusbar="false">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>

So is there any workaround to make Radwindow to open with same Width and Height without scrollbar?
Please help me..
0
Marin Bratanov
Telerik team
answered on 17 Jun 2011, 11:35 AM
Hello Titti,

We are aware of a small height difference in Opera but we are still unable to work around this browser's peculiarity in this case. When we fix it this information will be available in the release notes.

We do not use min-height property as there are a lot of scenarios to be considered and we have determined the current settings are better overall. After all, when the NavigateUrl property is used there is generally a whole page inside the RadWindow and its height would rarely be below 150px so that IE would behave differently.

My example was just to point out that IE allows a slightly odd behavior compared to other browsers and that this is where this behavior stems.

If you do not wish to have scrollbars on the page loaded in the RadWindow you could add a simple CSS rule that disables them to that page:
html, body, form
{
    overflow: hidden;
}



Regards,
Marin
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
TSM
Top achievements
Rank 1
answered on 17 Jun 2011, 01:22 PM
Hi Marin ,
                 Thanks for the reply..Waiting for the fix..Can i know which is the best time to ask a question
in Telerik forums so that i can get a reply soon...

Thanks and Regards,
Titti Skaria.
 
0
Marin Bratanov
Telerik team
answered on 20 Jun 2011, 03:14 PM
Hi Titti,

The forums are generally a community content. This means that we cannot guarantee that there will be an answer and how long it will take. We do our best to monitor them, but the priority of the support tickets is higher as listed in the following page: http://www.telerik.com/support/technical-support-options.aspx.


Regards,
Marin
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Window
Asked by
TSM
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
TSM
Top achievements
Rank 1
Share this question
or