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

AllowColumnResize and browser window resize...

3 Answers 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ken De Vries
Top achievements
Rank 1
Ken De Vries asked on 20 Feb 2011, 01:51 AM
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>

 

 

 

 

 

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 23 Feb 2011, 04:03 PM
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!
0
Jonathan
Top achievements
Rank 1
answered on 09 Nov 2011, 03:55 PM
Hi

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

I am currently encountering a similar problem.

Regards,
Jonathan
0
Pavlina
Telerik team
answered on 09 Nov 2011, 04:23 PM
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
Tags
Grid
Asked by
Ken De Vries
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Jonathan
Top achievements
Rank 1
Share this question
or