captainsac
captainsac

Reputation: 2490

How to make a single column in Telerik Radgrid Resizable?

I have the following Telerik RadGrid.

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="true" AllowSorting="true"
PageSize="50" HeaderStyle-Height="20" ShowStatusBar="true" AllowCustomPaging="True"
OnNeedDataSource="RadGrid1_NeedDataSource" OnSortCommand="RadGrid1_SortCommand"
OnPageSizeChanged="RadGrid1_PageSizeChanged" OnPageIndexChanged="RadGrid1_PageIndexChanged"
OnItemCommand="RadGrid1_ItemCommand" OnItemDataBound="RadGrid1_ItemDataBound">
<clientsettings>
<Selecting AllowRowSelect="True" />
<Resizing EnableRealTimeResize="true" />
</clientsettings>
<exportsettings filename="list">
</exportsettings>
<mastertableview datakeynames="ID" autogeneratecolumns="false"> 
<PagerStyle AlwaysVisible="true" PagerTextFormat="{4} {5} item(s) in {1} page(s)" />
<Columns>
  <telerik:GridBoundColumn DataField="Contract" HeaderStyle-Width="20%" HeaderText="Contract Title" 
  UniqueName="Contract" SortExpression="Contract"> </telerik:GridBoundColumn>

 <telerik:GridBoundColumn DataField="Customer" HeaderStyle-Width="20%" HeaderText="Vendor"
  UniqueName="Vendor" SortExpression="Customer"> </telerik:GridBoundColumn>

 <telerik:GridBoundColumn DataField="Contractor" HeaderStyle-Width="20%" HeaderText="Contractor"
  UniqueName="Contractor" SortExpression="Contractor"></telerik:GridBoundColumn>

  **<telerik:GridBoundColumn DataField="Name" HeaderText="Service"
  UniqueName="Name" SortExpression="Name" Resizable="true"> </telerik:GridBoundColumn>**


</Columns>
</mastertableview>
</telerik:RadGrid>

I want to make only the last column (Name) resizable. I used Resizable="true" but it is not working. Is there any other way for it?

Upvotes: 0

Views: 614

Answers (1)

Sikandar Amla
Sikandar Amla

Reputation: 1475

You need to add AllowColumnResize="True" on RadGrid and you can disable other column's resize properties by using Resizable="False".

Upvotes: 1

Related Questions