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

Auto resize no working

1 Answer 49 Views
Window
This is a migrated thread and some comments may be shown as answers.
Allen
Top achievements
Rank 1
Allen asked on 06 Feb 2013, 07:59 PM
The modal is not resizing.  Please refer to the PNG file.
Here is my code:
<telerik:RadWindow ID="RadWindow2" runat="server"
                                                                        Modal="True" Behaviors="Move, Reload" Title="     Recurrence"
                                                                        AutoSize="True" ForeColor="White"
                                                                        AutoSizeBehaviors="Width, Height, Default" ReloadOnShow="True">
                                                                    <ContentTemplate>
                                                                        <p align="left">
                                                                                <asp:RadioButtonList ID="RadioButtonList1" runat="server">
                                                                                    <asp:ListItem Value="ThisWeekOnly" Selected="True">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Selected Week</asp:ListItem>
                                                                                    <asp:ListItem Value="Forever" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Forever</asp:ListItem>
                                                                                    <asp:ListItem Value="Forever" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vocation !!!</asp:ListItem>
                                                                                    <asp:ListItem Value="Forever" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;More Vocation !!!!</asp:ListItem>
                                                                                    <asp:ListItem Value="Forever" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Even More Vocation !!!!!</asp:ListItem>
                                                                                </asp:RadioButtonList>
                                                                        </p>
                                                                        <p>                                                                                       
                                                                            <asp:Button ID="btnSubmit" runat="server" Text="Submit"
                                                                                ForeColor="White"
                                                                                BackColor="#CC0000" BorderStyle="Outset"
                                                                                Font-Bold="True"
                                                                                UseSubmitBehavior="False" EnableTheming="True" OnClick="btnSubmit_Click"/>
                                                                               
                                                                            <asp:Button ID="Cancelbtn" runat="server" BackColor="#CC0000"
                                                                                            BorderStyle="Outset" Font-Bold="True" ForeColor="White" Text="Cancel"
                                                                                            UseSubmitBehavior="False" />
                                                                        </p>
                                                                    </ContentTemplate>
                                                                    </telerik:RadWindow>

 

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 07 Feb 2013, 06:59 AM
Hi Allen

Merely setting the AutoSize property of the RadWindow to true is not always sufficient for this functionality to work as expected.

The content placed in the RadWindow needs to have explicit dimensions set in pixels. This is necessary, as otherwise you get a confrontation of concepts - a block element (such as the asp Panel, or div, or table) by default takes the width of its parent - 100% of it.
This means that it tries to autosize according to the RadWindow. In the same time we want the RadWindow to autosize itself according to this element, which leads to this obvious contradiction.

 This is the reason why some explicit dimensions must exist in the content. Therefore one of the best solutions is adding an empty div with no content or borders that has explicit width - it will not be visible, yet it will allow the RadWindow to autosize correctly.

For more information check the following help documentation
Autosizing Issues

Thanks
Princy
Tags
Window
Asked by
Allen
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or