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

Radwindow Top automatically re-sized when AutoSize="False"

1 Answer 152 Views
Window
This is a migrated thread and some comments may be shown as answers.
niteesh
Top achievements
Rank 1
niteesh asked on 09 May 2016, 02:52 PM

HI,

I have added a Radwindow to my aspx page as below.

 <telerik:RadWindow ID="rdWin" runat="server" Behaviors="None" AutoSize="false"
            Width="500px" Height="300px" Top="80px" Left="100px" Modal="true" OnClientShow="RadWindowAddOthers_Show" >

 

My AutoSize attribute is false. Inside my "RadWindowAddOthers_Show" method i am resetting few textboxes.

I am using ie11 in Ie9 mode.

<meta http-equiv="X-UA-Compatible" content="IE=9" />

<html class="t-ie t-ie9 _Telerik_IE9">

The above renders as below:

 

<div class="RadWindow RadWindow_Default rwNormalWindow rwTransparentWindow" id="RadWindowWrapper_ctl00_MainPageContentPlaceHolder_rdWin" style="top:770px;left: 433px; width: 500px; height: 300px; visibility: visible; position: absolute; z-index: 3002; transform: none;" unselectable="on"><table class="rwTable" style="height: 300px;" cellSpacing="0" cellPadding="0">

 

The top and left attributes are not as per the given values.

Also in the content template i have a div as follows which encloses all the content:

<div class="RadGrid RadGrid_Default" style="width: 500px;">

As an attempt to fix i have modified it to the following to make sure my content height is calculated properly:

<telerik:RadWindow ID="rdWin" runat="server" Behaviors="None" AutoSize="true"
            Width="500px" Height="300px" Top="80px" Left="100px" Modal="true" OnClientShow="RadWindowAddOthers_Show" OnClientAutoSizeEnd="OnClientAutoSizeEnd">

        function OnClientAutoSizeEnd(sender) {
            if ($telerik.isIE9) {
                setTimeout(function () {
                    sender.set_height(sender.get_height());
                }, 0);
            }
        }

I see that the radwindow is still positioned wrongly(i mean the top and left attributes are wrong). Can anyone suggest a fix to this issue?

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 10 May 2016, 07:26 AM

Hello,

A modal RadWindow is always centered on the screen and the following article explains how to change that so Top and Left can take effect: http://docs.telerik.com/devtools/aspnet-ajax/controls/window/troubleshooting/positioning-a-modal-radwindow.

Regards,

Marin Bratanov
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Window
Asked by
niteesh
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or