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

RadGrid grouping causing columns to be resized

1 Answer 185 Views
Grid
This is a migrated thread and some comments may be shown as answers.
wonderbison
Top achievements
Rank 1
wonderbison asked on 15 Jun 2011, 08:32 AM
Hi

I have a master/detail ASP.NET setup with a grid in the middle cell of the master/detail setup. Below is the setup of the grid. When I drag a column up to be grouped, the grid shrinks from a horizontal scrollable grid to one where all the columns are shrunk so that they fit without scrolling. Searched high and low for the necessary setting but to no avail.

Before and after images attached

Help appreciated

   <telerik:RadGrid ID="RadGridData" runat="server" 
    AllowFilteringByColumn="True" AllowSorting="True" GridLines="None" 
    ShowGroupPanel="True" AllowPaging="True" 
        onneeddatasource="RadGridData_NeedDataSource" PageSize="25" 
        ShowStatusBar="True" ViewStateMode="Enabled">
        <MasterTableView Width="100%" Height="100%">
        </MasterTableView>
       <ClientSettings AllowDragToGroup="True" AllowAutoScrollOnDragDrop="False">
           <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" />
       </ClientSettings>
<MasterTableView>
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
  
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
</MasterTableView>
  
<HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu>
    </telerik:RadGrid>

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 15 Jun 2011, 02:52 PM
Hi Robin,

If you are using scrolling with static headers, the master table's layout is "auto" and there are no column widths specified, the columns will shrink to fill the minimum required space - this is expected.

In order to avoid this, please either set column widths, or set TableLayout="Fixed".

All the best,
Pavlina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
wonderbison
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or