niteesh.ravi
niteesh.ravi

Reputation: 33

Radwindow automatically re-sized when AutoSize="False"

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.

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

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:

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?

Upvotes: 0

Views: 1072

Answers (1)

Kramb
Kramb

Reputation: 1092

By Default, the CenterIfModal property is true for the Telerik RadWindow.

In order to get a custom position for a modal Radwindow the CenterIfModal property must be used.

So just set the CenterIfModal = "false"

Positioning a Modal RadWindow

Upvotes: 1

Related Questions