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

Columns seem to be "moving" instead of "resizing"

3 Answers 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
J
Top achievements
Rank 1
J asked on 10 Feb 2014, 08:50 PM
The columns in my grid don't seem to be resizing the way (I think) they should. The column I'm resizing will get bigger or smaller, but instead of the other columns adjusting their widths, they just "move" according to the column being resized. For instance, if I make a column (let's say column 2) smaller (i.e. dragging right to left), all of the columns to the right (let's say columns 3 and 4) will get smaller. It's almost like there is an invisible column 5 that's being resized along with column 2, instead of columns 3 and 4 adjusting themselves. Conversely, if I make column 2 bigger it will just push the other columns "out", causing the grid to render a horizontal scroll bar. Here is a sample of some relevant code:

<telerik:RadGrid runat="server" ID="RadGrid1" EnableEmbeddedSkins="False" Skin="Default"
 Width="100%" AutoGenerateColumns="False" OnNeedDataSource="RadGrid1_NeedDataSource"
 AllowMultiRowSelection="True" AllowFilteringByColumn="True">
   <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
   <ItemStyle HorizontalAlign="Left"></ItemStyle>
   <AlternatingItemStyle HorizontalAlign="Left"></AlternatingItemStyle>
   <ClientSettings AllowColumnsReorder="False" EnablePostBackOnRowClick="False">
      <Scrolling UseStaticHeaders="True" AllowScroll="True" ScrollHeight="500px"/>
      <Resizing AllowColumnResize="True" EnableRealTimeResize="False"
       ClipCellContentOnResize="True" />
      <Selecting AllowRowSelect="True"/>
   </ClientSettings>
   <MasterTableView AllowPaging="True" AllowSorting="True" PageSize="500" TableLayout="Fixed"
    Width="100%"
      <Columns>
         <telerik:GridClientSelectColumn UniqueName="cbColumn" HeaderStyle-Width="3%"
          HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left"/>
         <telerik:GridBoundColumn UniqueName="ID" Visible="False" DataField="ID"/>
         <telerik:GridBoundColumn UniqueName="ConfNo" HeaderText="Conf No" DataField="ConfNo"
          HeaderStyle-Width="20%" FilterControlWidth="65%"/>
         <telerik:GridBoundColumn UniqueName="Set No" HeaderText="Set No" DataField="SetNo"
          HeaderStyle-Width="20%" FilterControlWidth="65%"/>
         <telerik:GridBoundColumn UniqueName="Name" HeaderText="Name" DataField="Name"
          HeaderStyle-Width="57%" FilterControlWidth="85%"/>
      </Columns>
   </MasterTableView>
</telerik:RadGrid>

Any help appreciated!

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 Feb 2014, 09:42 AM
Hi,

Can you try setting UseStaticHeaders="false". Note that after finishing resizing, the columns located on the right side of the current resized column, will be automatically resized to eaqual portions. This is expected because the browser resize the rest of the columns by itself. The behavior could be avoided by enabling ResizeGridOnColumnResize .
Take a look into this documentation on Resizing Columns for more information.

Thanks,
Princy
0
J
Top achievements
Rank 1
answered on 19 Feb 2014, 01:07 PM
Thanks Princy. Ideally I would have liked to have the static headers and not resize the grid on column resize, but one of these solutions should be acceptable. I appreciate the help!
0
Venelin
Telerik team
answered on 24 Feb 2014, 08:21 AM
Hi,

We are aware of the problem you are talking about. It will be fixed as soon as possible. Until then you can use a workaround that I have provided in the sample project attached here. Please run it locally and see if this is the expected behavior.

Regards,
Venelin
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 UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
J
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
J
Top achievements
Rank 1
Venelin
Telerik team
Share this question
or