AllowColumnResize and browser window resize...

4 posts, 0 answers
  1. Ken De Vries
    Ken De Vries avatar
    24 posts
    Member since:
    Mar 2010

    Posted 19 Feb 2011 Link to this post

    I am experiencing a problem with column resizing and the Grid itself not resizing correctly.

    If I resize a column by dragging one side of the column left or right and then resize the whole browser window, the grid does not conform to the Width="100%" attribute.

    The grid needs to expand and contract along withthe width of the browser window.  After resizing a column, the grid remains at the original width and is then fixed until the page is refreshed.

    The grid behaves properly before the column is resized.

            <telerik:RadGrid ID="grdRules" runat="server"                               
                    AllowPaging="true"
                    AutoPostBack="true"
                    AllowSorting="false"
                    EnableViewState="true"
                    AutoGenerateColumns="false" 
                    GridLines="None" 
                    PagerSettings-Visible="true"
                    HeaderStyle-CssClass="GridHeader" 
                    RowStyle-CssClass="GridShade"
                    AlternatingRowStyle-CssClass="AltGridShade"
                    OnItemDataBound="grdRules_OnItemDataBound"
                    OnPageIndexChanged="grdRules_OnPageIndexChanged"
                    OnPageSizeChanged="grdRules_OnPageSizeChanged"
                    OnRowCommand="grdRules_OnRowCommand"
                    Width="100%" 
                    PageSize="20"
                    AllowFilteringByColumn="false"
                    BorderStyle="None"
                    Skin="Default"
                    >
                        <PagerStyle Position="TopAndBottom" Mode="NextPrevAndNumeric" />
                        <ClientSettings 
                            Resizing-AllowResizeToFit="true" 
                            Scrolling-AllowScroll="false" 
                            Resizing-AllowColumnResize="true"
                            />
                        <MasterTableView  TableLayout="Auto"  >
                        <Columns>
                            <telerik:GridBoundColumn DataField="RuleName" HeaderText="Name" HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true"  />
                            <telerik:GridBoundColumn DataField="TargetCategoryDescription" HeaderText="Category" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" />
                            <telerik:GridBoundColumn DataField="TargetCompany" HeaderText="Manufacturer" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" />
                            <telerik:GridBoundColumn DataField="TargetModel" HeaderText="Model" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" />
                            <telerik:GridBoundColumn DataField="RuleTypeDescription" HeaderText="Action" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" />
                            <telerik:GridBoundColumn DataField="EntityCount" HeaderText="Attachments" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" />
                            <telerik:GridBoundColumn DataField="RuleCriteriaID" HeaderText="ID" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" />
                            <telerik:GridTemplateColumn Resizable="false" ItemStyle-HorizontalAlign="Right" >
                                <ItemTemplate>
                                    <asp:Image ID="btnPopup" runat="server" ImageUrl="images/Expand.jpg" CssClass="gridMenuIcon" />
                                    <telerik:RadContextMenu 
                                            ID="mnuRow" 
                                            runat="server" 
                                            OnItemClick="RulesContextMenu_Click" 
                                            OnClientItemClicking="OnDeleteItemClicking" 
                                            CollapseAnimation-Duration="100" 
                                            ExpandAnimation-Duration="100" 
                                            ExpandDelay="0">
                                            <Targets>
                                                <telerik:ContextMenuControlTarget ControlID="btnPopup" />
                                            </Targets>
                                    </telerik:RadContextMenu>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                    </Columns>
            </MasterTableView>
    </telerik:RadGrid>

     

     

     

     

     

  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 23 Feb 2011 Link to this post

    Hello Ken,

    I noticed that you have opened also a support ticket for the same thing. It is highly recommended that you keep related questions in one support thread or a forum post, so that we can easily keep track of your support history and provide better answers in a shorter time. Therefore I will ask you to continue our communication there.

    Thank you.

    Greetings,
    Pavlina
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jonathan
    Jonathan avatar
    33 posts
    Member since:
    Jan 2011

    Posted 09 Nov 2011 Link to this post

    Hi

    Any chance we could have the solution posted here as well?

    I am currently encountering a similar problem.

    Regards,
    Jonathan
  5. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 09 Nov 2011 Link to this post

    Hi Jonathan,

    Unfortunately, the desired functionality could not be achieved, because when you set Resizing-AllowColumnResize="true" the table-layout attribute is set to fixed. Therefore when you resize column the grid no longer resizes along with the browser window.

    Please excuse us for the inconveniences caused.

    Greetings,
    Pavlina
    the Telerik team
    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 their blog feed now
Back to Top