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

Client autoSize(n) and AutoSizeBehaviors="Height"

1 Answer 264 Views
Window
This is a migrated thread and some comments may be shown as answers.
Sébastien
Top achievements
Rank 2
Sébastien asked on 14 Mar 2011, 12:03 PM
Dear Telerik Team,

I have a RadTabStrip inside a RadWindow. The RadWindow is set in fixed Width and the AutoSizeBehavior is set to Height. On the OnClientTabSelected event of the RadTabStrip element, I call autoSize() in order to reset the height of the window to fit its new content. I was expecting the window to stay on its fixed width, but despite of the Width restriction, the window's width is reset : the window become larger on every tab change.

Here is the code I use : 

Configuring the RadWindow : 
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableEmbeddedSkins="false">
       <Windows>
           <telerik:RadWindow ID="MyDialog" runat="server" Title="My Title"
               Width="970px" AutoSize="true" AutoSizeBehaviors="Height" ReloadOnShow="true"
               ShowContentDuringLoad="false" Behaviors="Move, Maximize" Modal="true" VisibleStatusbar="false" />
       </Windows>
   </telerik:RadWindowManager>

The opening is done using : 
function ShowProjectEditForm(id, rowIndex) {
                window.radopen("MyPage.aspx?IdItem=" + id, "MyDialog");
                return false;
            }

MyPage.aspx : 
<telerik:RadAjaxPanel EnableAJAX="true" runat="server" ID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1">
    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
 
        <script type="text/javascript">
            function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow;
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
                return oWindow;
            }
 
            function autoSizeTheWindow(sender, args) {
                GetRadWindow().autoSize(true);
            }
        </script>
 
    </telerik:RadScriptBlock>
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1"
        EnableEmbeddedSkins="False" SelectedIndex="0" ReorderTabsOnSelect="True"  ShowBaseLine="true" OnClientTabSelected="autoSizeTheWindow">
        <Tabs>
            <telerik:RadTab Text="Tab1" runat="server" id="Tab1">
            </telerik:RadTab>
            <telerik:RadTab Text="Tab2" runat="server" id="Tab2">
            </telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" Height="100%"
        Width="100%" BackColor="White">
        <telerik:RadPageView ID="PageView1" runat="server">
            [Many content goes here including content having Width="100%"]</telerik:RadPageView>
       <telerik:RadPageView ID="PageView2" runat="server">
            [Many content goes here including content having Width="100%"]</telerik:RadPageView>
</telerik:RadAjaxPanel>

When  I go from Tab1 to Tab2, the window grow, and grow, and grow ...

In other situations, the Height is set as fixed and the AutoSizeBehavior is set to Width and the same effect is produced.


Do you have already met the solution ?

Cheers,

S.F.

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 17 Mar 2011, 01:12 PM
Hi Sébastien,

I don't recall this problem being reported before and I tried to reproduce the problem locally but to no avail. Please open a support ticket and send us a small sample project where the problem can be reproduced and we will check it right away. There is no need to send us your real database if you are using one - you can use one of the fake ones, linked in the blog post.


Regards,
Georgi Tunev
the Telerik team
Tags
Window
Asked by
Sébastien
Top achievements
Rank 2
Answers by
Georgi Tunev
Telerik team
Share this question
or