RenderMode="Lightweight" Causes content area height to change after postback

2 posts, 0 answers
  1. Sam Tran
    Sam Tran avatar
    83 posts
    Member since:
    Nov 2006

    Posted 27 Jun 2013 Link to this post

    Hi,

    I'd really like to use RenderMode="Lightweight", but am finding this issue:

    When a radwindow first loads, the content takes up most of the window.
    If the content page in the radwindow does a postback, the window height jumps to the minimum height.

    You can see this from my screen shots.

    Here's some test aspx

    <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="RadWindowTest.aspx.vb" Inherits="WebApp.RadWindowTest" %>
     
    <!DOCTYPE html>
     
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
            </telerik:RadStyleSheetManager>
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
                <Scripts>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
                    </asp:ScriptReference>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
                    </asp:ScriptReference>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
                    </asp:ScriptReference>
                </Scripts>
            </telerik:RadScriptManager>
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            </telerik:RadAjaxManager>
        <div>
            <telerik:RadWindowManager ID="RadWindowManagerParent" runat="server" Animation="None" RenderMode="Lightweight"
                OffsetElementID="WindowAnchor" RestrictionZoneID="DivContent" EnableTheming="true" Opacity="100"
                AnimationDuration="0" DestroyOnClose="true" EnableShadow="true"
                PreserveClientState="true" ShowContentDuringLoad="False" ShowOnTopWhenMaximized="False"
                Width="1000" Height="600" VisibleStatusbar="false" ReloadOnShow="false" KeepInScreenBounds="False"
                Style="z-index: 2501;" Behaviors="Close,Maximize,Minimize,Move,Reload,Resize"
                EnableViewState="False">
                <Windows>
                    <telerik:RadWindow ID="RadWindow1" runat="server" VisibleOnPageLoad="true"
                        NavigateUrl="RadWindowContent.aspx">
                    </telerik:RadWindow>  
                </Windows>
            </telerik:RadWindowManager>
     
        </div>
        </form>
    </body>
    </html>

    The content that loads in the window "RadWindowContent.aspx"

    <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="RadWindowContent.aspx.vb" Inherits="WebApp.RadWindowContent" %>
     
    <!DOCTYPE html>
     
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
            </telerik:RadStyleSheetManager>
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
                <Scripts>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js"></asp:ScriptReference>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js"></asp:ScriptReference>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js"></asp:ScriptReference>
                </Scripts>
            </telerik:RadScriptManager>
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            </telerik:RadAjaxManager>
            <div>
            <table width="100%" border="0" cellspacing="2" cellpadding="0">
                <tr>
                    <td width="250" align="left" valign="top">
                        <asp:Panel ID="PnlSearch" runat="server" DefaultButton="BtnSearch">
                            <div align="left">
                                <telerik:RadPanelBar ID="RadPanelbarSearch" runat="server" CollapseAnimation-Duration="100"
                                    CollapseAnimation-Type="Linear" ExpandAnimation-Duration="100" ExpandAnimation-Type="Linear"
                                    ExpandMode="SingleExpandedItem" Width="300px">
                                    <Items>
                                        <telerik:RadPanelItem runat="server" Expanded="true" Text="Search Criteria">
                                            <Items>
                                                <telerik:RadPanelItem runat="server">
                                                    <ItemTemplate>
                                                        <table border="0" cellpadding="0" cellspacing="2" width="280">
                                                            <tr id="TrSelect" runat="server">
                                                                <td width="115px">    <span>View:</span>
                                                                </td>
                                                                <td>
                                                                    <asp:RadioButtonList ID="RblSelect" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"
                                                                        AutoPostBack="true">
                                                                        <asp:ListItem Text="Single" Value="single"></asp:ListItem>
                                                                        <asp:ListItem Text="Multi" Value="multi" Selected="True"></asp:ListItem>
                                                                    </asp:RadioButtonList>
                                                                </td>
                                                            </tr>
                                                            <tr id="TrOffice" runat="server">
                                                                <td width="117">   
                                                                <asp:HyperLink ID="hlOffice" runat="server" href="" TabIndex="-1">Office:</asp:HyperLink>
                                                                </td>
                                                                <td width="153">
                                                                    <asp:TextBox ID="txtOffice" runat="server" Width="135px" MaxLength="4" TabIndex="1"></asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr id="TrClient" runat="server">
                                                                <td>   
                                                                <asp:HyperLink ID="hlClient" runat="server" TabIndex="-1" NavigateUrl="~/Blank.htm"><span>Client:</span></asp:HyperLink>
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="txtClient" runat="server" Width="135px" TabIndex="1" MaxLength="6"></asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr id="TrDivision" runat="server">
                                                                <td>   
                                                                <asp:HyperLink ID="hlDivision" runat="server" TabIndex="-1" NavigateUrl="~/Blank.htm"><span>Division:</span></asp:HyperLink>
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="txtDivision" runat="server" Width="135px" TabIndex="2" MaxLength="6"></asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr id="TrProduct" runat="server">
                                                                <td>   
                                                                <asp:HyperLink ID="hlProduct" runat="server" TabIndex="-1" NavigateUrl="~/Blank.htm"><span>Product:</span></asp:HyperLink>
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="txtProduct" runat="server" Width="135px" TabIndex="3" MaxLength="6"></asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr id="TrSalesClass" runat="server">
                                                                <td>   
                                                                <asp:HyperLink ID="hlSalesClass" runat="server" href="" TabIndex="-1"><span>Sales Class:</span></asp:HyperLink>
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="txtSalesClass" runat="server" Width="135px" TabIndex="4" MaxLength="6"></asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr id="Tr4" runat="server">
                                                                <td>   
                                                                <asp:HyperLink ID="HlCampaign" runat="server" TabIndex="-1" NavigateUrl="~/Blank.htm"><span>Campaign:</span></asp:HyperLink>
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="TxtCampaign" runat="server" MaxLength="6" TabIndex="5" Text="" Width="135px"></asp:TextBox>
                                                                    <asp:HiddenField ID="hfCampaignID" runat="server" />
                                                                </td>
                                                            </tr>
                                                            <tr id="TrJobNum" runat="server">
                                                                <td>   
                                                                <asp:HyperLink ID="hlJob" runat="server" TabIndex="-1" NavigateUrl="~/Blank.htm"><span>Job:</span></asp:HyperLink>
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="txtJob" runat="server" Width="135px" TabIndex="6" MaxLength="6"></asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr id="TrJobComp" runat="server">
                                                                <td>   
                                                                <asp:HyperLink ID="hlComponent" runat="server" TabIndex="-1" NavigateUrl="~/Blank.htm"><span>Component:</span></asp:HyperLink>
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="txtComponent" runat="server" Width="135px" MaxLength="6" TabIndex="7"></asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr id="Tr2" runat="server">
                                                                <td>   
                                                                <asp:HyperLink ID="HlAccountExecutive" runat="server" TabIndex="-1" NavigateUrl="~/Blank.htm"><span>AE:</span></asp:HyperLink>
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="TxtAccountExecutive" runat="server" MaxLength="6" TabIndex="8" Text=""
                                                                        Width="135px"></asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr id="Tr0" runat="server">
                                                                <td
                                                                </td>
                                                                <td
                                                                </td>
                                                            </tr>
                                                            <tr id="Tr1" runat="server">
                                                                <td>   
                                                                <asp:HyperLink ID="HlManager" runat="server" TabIndex="-1" NavigateUrl="~/Blank.htm"></asp:HyperLink>
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="TxtManager" runat="server" MaxLength="6" TabIndex="9" Text="" Width="135px"></asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr id="Tr3" runat="server">
                                                                <td colspan="2">   
                                                                <asp:CheckBox ID="ChkExcludeCompletedSchedules" runat="server" Checked="True" TabIndex="10"
                                                                    Text="" />Exclude Completed Schedules
                                                                </td>
                                                            </tr>
                                                            <tr id="Tr13" runat="server">
                                                                <td
                                                                </td>
                                                                <td
                                                                </td>
                                                            </tr>
                                                            <tr id="Tr5" runat="server">
                                                                <td>    <span>Phase:</span>
                                                                </td>
                                                                <td>
                                                                    <telerik:RadComboBox ID="DropPhaseFilter" runat="server" TabIndex="11" AppendDataBoundItems="true"
                                                                        DropDownWidth="175" Width="137" Visible="true">
                                                                        <Items>
                                                                            <telerik:RadComboBoxItem Text="[No Filter]" Value="no_filter"></telerik:RadComboBoxItem>
                                                                        </Items>
                                                                    </telerik:RadComboBox>
                                                                </td>
                                                            </tr>
                                                            <tr id="Tr7" runat="server">
                                                                <td>   
                                                                <asp:HyperLink ID="HlRole" runat="server" TabIndex="-1" NavigateUrl="~/Blank.htm"><span>Role:</span></asp:HyperLink>
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="TxtRole" runat="server" MaxLength="6" TabIndex="12" Text="" Width="135px"></asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr id="Tr9" runat="server">
                                                                <td>   
                                                                <asp:HyperLink ID="HlTask" runat="server" TabIndex="-1" NavigateUrl="~/Blank.htm"><span>Task:</span></asp:HyperLink>
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="TxtTaskCode" runat="server" MaxLength="10" TabIndex="13" Text=""
                                                                        Width="135px"></asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr id="Tr11" runat="server">
                                                                <td>   
                                                                <asp:HyperLink ID="HlEmployee" runat="server" TabIndex="-1" NavigateUrl="~/Blank.htm"><span>Employee:</span></asp:HyperLink>
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="TxtEmployee" runat="server" MaxLength="6" TabIndex="14" Text=""
                                                                        Width="135px"></asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr id="Tr12" runat="server">
                                                                <td>    <span>Date Cutoff:</span>
                                                                </td>
                                                                <td>
                                                                    <telerik:RadDatePicker ID="RadDatePickerDateCutoff" runat="server" MinDate="1950-01-01"
                                                                        DatePopupButton-ToolTip="Show calendar" MaxDate="2050-01-01" Width="163px">
                                                                        <DateInput DateFormat="d" EmptyMessage="Start Date" TabIndex="15">
                                                                            <IncrementSettings InterceptArrowKeys="true" InterceptMouseWheel="true" />
                                                                        </DateInput>
                                                                        <Calendar ID="CalendarStartDate" RangeMinDate="1900-01-01" runat="server" RenderMode="Lightweight">
                                                                            <SpecialDays>
                                                                                <telerik:RadCalendarDay Repeatable="Today" ItemStyle-BackColor="LightSalmon">
                                                                                </telerik:RadCalendarDay>
                                                                            </SpecialDays>
                                                                        </Calendar>
                                                                    </telerik:RadDatePicker>
                                                                </td>
                                                            </tr>
                                                            <tr id="Tr6" runat="server">
                                                                <td colspan="2">   
                                                                <asp:CheckBox ID="ChkOnlyPendingTasks" runat="server" TabIndex="16" Text="" />Only
                                                                Pending Tasks
                                                                </td>
                                                            </tr>
                                                            <tr id="Tr8" runat="server">
                                                                <td colspan="2">   
                                                                <asp:CheckBox ID="ChkExcludeProjectedTasks" runat="server" TabIndex="17" Text="" />Exclude
                                                                Projected Tasks
                                                                </td>
                                                            </tr>
                                                            <tr id="Tr10" runat="server">
                                                                <td colspan="2">   
                                                                <asp:CheckBox ID="ChkIncludeCompletedTasks" runat="server" Checked="True" TabIndex="18"
                                                                    Text="" />Include Completed Tasks
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </ItemTemplate>
                                                </telerik:RadPanelItem>
                                            </Items>
                                        </telerik:RadPanelItem>
                                    </Items>
                                </telerik:RadPanelBar>
                            </div>
                            <div style="display: none;">
                                <asp:Button ID="BtnSearch" runat="server" Text="Search" Visible="true" TabIndex="-1" />
                            </div>
                        </asp:Panel>
                    </td>
                    <td align="left" valign="top">
                        <telerik:RadToolBar ID="RadToolbarSearch" runat="server" AutoPostBack="true" Width="100%"
                            TabIndex="-1">
                            <Items>
                                <telerik:RadToolBarButton IsSeparator="true" />
                                <telerik:RadToolBarButton ID="RadToolbarButtonSearch" ImageUrl="Images/Find.png"
                                    Text="Search" Value="Search" ToolTip="Search" />
                                <telerik:RadToolBarButton IsSeparator="true" />
                                <telerik:RadToolBarButton ID="RadToolbarButtonNew" ImageUrl="Images/add2.png" ToolTip="New"
                                    Text="New" Value="New" />
                                <telerik:RadToolBarButton IsSeparator="true" />
                                <telerik:RadToolBarButton ID="RadToolbarButtonClear" ImageUrl="Images/undo.png" Text="Clear"
                                    Value="Clear" ToolTip="Clear" />
                                <telerik:RadToolBarButton ImageUrl="Images/bookmark16.png" Text="" Value="Bookmark"
                                    ToolTip="Bookmark" Visible="false" />
                                <telerik:RadToolBarButton IsSeparator="true" />
                            </Items>
                        </telerik:RadToolBar>
                        <telerik:RadGrid ID="RadGridProjectScheduleSearch" runat="server" AllowSorting="True"
                            AutoGenerateColumns="False" GridLines="None" GroupingSettings-GroupByFieldsSeparator="  "
                            AllowPaging="true" PageSize="15" EnableEmbeddedSkins="True">
                            <PagerStyle Mode="NextPrevNumericAndAdvanced" AlwaysVisible="true" Position="Bottom"></PagerStyle>
                            <SortingSettings SortedAscToolTip="Sorted ascending" SortedDescToolTip="Sorted descending" />
                            <ClientSettings AllowColumnsReorder="False">
                            </ClientSettings>
                            <GroupingSettings GroupByFieldsSeparator=" " />
                            <MasterTableView HorizontalAlign="Left" DataKeyNames="JOB_NUMBER,JOB_COMPONENT_NBR">
                                <Columns>
                                    <telerik:GridTemplateColumn>
                                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="18px" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="18px" />
                                        <ItemTemplate>
                                            <asp:ImageButton ID="butDetail" runat="server" CommandName="Detail" ImageAlign="AbsMiddle"
                                                TabIndex="21" ImageUrl="~/Images/view-trans.png" />
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn Visible="false">
                                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="18px" />
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="18px" />
                                        <ItemTemplate>
                                            <asp:ImageButton ID="ImgBtnPrint" runat="server" CommandName="Print" ImageAlign="AbsMiddle"
                                                ToolTip="Print/Send Schedule" ImageUrl="~/Images/printer2-trans.png" />
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Job Number" SortExpression="JOB_NUMBER">
                                        <HeaderStyle HorizontalAlign="left" VerticalAlign="Middle" Width="70px" />
                                        <ItemStyle HorizontalAlign="left" VerticalAlign="Middle" Width="70px" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblJobNum" runat="server" Text='<%#Eval("JOB_NUMBER")%>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Job Description" SortExpression="JOB_DESC">
                                        <HeaderStyle HorizontalAlign="left" VerticalAlign="Middle" />
                                        <ItemStyle HorizontalAlign="left" VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblJobDesc" runat="server" Text='<%#Eval("JOB_DESC")%>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Component Number" SortExpression="JOB_COMPONENT_NBR">
                                        <HeaderStyle HorizontalAlign="left" VerticalAlign="Middle" Width="70px" />
                                        <ItemStyle HorizontalAlign="left" VerticalAlign="Middle" Width="70px" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblJobComp" runat="server" Text='<%#Eval("JOB_COMPONENT_NBR")%>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Component Description" SortExpression="JOB_COMP_DESC">
                                        <HeaderStyle HorizontalAlign="left" VerticalAlign="Middle" />
                                        <ItemStyle HorizontalAlign="left" VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblJobCompDesc" runat="server" Text='<%#Eval("JOB_COMP_DESC")%>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Client" SortExpression="CL_CODE">
                                        <HeaderStyle HorizontalAlign="left" VerticalAlign="Middle" Width="55" />
                                        <ItemStyle HorizontalAlign="left" VerticalAlign="Middle" Width="55" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblClientCode" runat="server" Text='<%#Eval("CL_CODE")%>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Division" SortExpression="DIV_CODE">
                                        <HeaderStyle HorizontalAlign="left" VerticalAlign="Middle" Width="55" />
                                        <ItemStyle HorizontalAlign="left" VerticalAlign="Middle" Width="55" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblDivisionCode" runat="server" Text='<%#Eval("DIV_CODE")%>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Product" SortExpression="PRD_CODE">
                                        <HeaderStyle HorizontalAlign="left" VerticalAlign="Middle" Width="55" />
                                        <ItemStyle HorizontalAlign="left" VerticalAlign="Middle" Width="55" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblProductCode" runat="server" Text='<%#Eval("PRD_CODE")%>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                </Columns>
                                <FilterItemStyle VerticalAlign="Top" Wrap="False" />
                                <ExpandCollapseColumn Visible="False">
                                    <HeaderStyle Width="19px" />
                                </ExpandCollapseColumn>
                                <RowIndicatorColumn Visible="False">
                                    <HeaderStyle Width="20px" />
                                </RowIndicatorColumn>
                            </MasterTableView>
                        </telerik:RadGrid>
                    </td>
                </tr>
            </table>
        </div>
        </form>
    </body>
    </html>

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 28 Jun 2013 Link to this post

    Hello Sam,

    We are already aware of this problem and it is logged for improvement. You can follow, vote and comment on the case here: FIX On a subsequent page load (page refresh, postback, navigation) when ShowContentDuringLoad=false in LightWeight RenderMode the content page height shrinks.


    Regards,
    Marin Bratanov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top