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

Resizing Column Makes Grid Wider Than Screen

1 Answer 285 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Developer
Top achievements
Rank 1
Developer asked on 20 Oct 2009, 08:02 PM
Hello, I am trying to make my grid be able to client side column resize without making the grid larger.....

In essence, when the user makes one grid column larger, the rest get smaller to fit the screen.  I know it is possible because I ran across one of your examples that did it, however I copied the settings in the clientside section and it didn't work for me....the grid width still grew to larger than my screen width.  Here is my grid:

        <telerik:RadGrid ID="RadGrid1" runat="server" Skin="Sunset" AllowSorting="true" ShowFooter="true">  
          
 
<MasterTableView Width="100%">  
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
</MasterTableView> 
 
 
        <ClientSettings AllowColumnHide="true">  
            <Scrolling AllowScroll="true" UseStaticHeaders="true" /> 
            <Resizing AllowColumnResize="true" ClipCellContentOnResize="true" /> 
        </ClientSettings> 
          
        </telerik:RadGrid> 
What I am doing wrong?

Thanks...

UPDATE - I had some CSS styles that were screwing up the grid in the header of my page....the grid now correctly stays within the desired area but presents a scroll bar at the bottom to view data that gets pushed out of the screen.....which is acceptable, but I would still like to know how to make the other columns resize automatically.

1 Answer, 1 is accepted

Sort by
0
Accepted
Pavlina
Telerik team
answered on 21 Oct 2009, 08:58 AM
Hello Developer,

The ClientSettings.Resizing.ResizeGridOnColumnResize property lets you specify whether the entire grid changes size when its columns are resized.
When this property is set to False (the default), the grid preserves its size and resizes the rest of the columns evenly.
If you set ResizeGridOnColumnResize to True, the grid changes its size dynamically when the user resizes a column. All other columns retain their original sizes.

Please find more information in the following help article:
Resizing columns

Sincerely yours,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Developer
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or