Resizing Columns

Columns inside the RadGridView are resizable by default. The user is able to easily change the column width by positioning the mouse over the columns vertical grid line and dragging it until the desired size is achieved.

Telerik Silverlight DataGrid Resizing Columns 1

To resize a column in code, you can use its Width property. For example:

Example 1: Setting a column with fixed width

<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" 
                Header="Name" 
                Width="100" /> 

Disabling Resizing

There are two ways to disable the resizing.
1. The first one is by setting the CanUserResizeColumns property to False.

Example 2: Disable resizing for all columns within a RadGridView

<telerik:RadGridView x:Name="radGridView" 
                 CanUserResizeColumns="False"> 
    <!-- ... --> 
</telerik:RadGridView> 
This will disable resizing on RadGridView level, which means that all of the columns won't be resizable.

2. If you want to disable resizing only for a particular column, use the IsResizable property of the column.

Example 3: Disable resizing for a specific column

<telerik:GridViewDataColumn Header="ID" 
                DataMemberBinding="{Binding EmployeeID}" 
                UniqueName="ID"  
                IsResizable="False" /> 

Resizing Events

When the user resizes a column, the ColumnWidthChanging event is fired and if it is not canceled the ColumnWidthChanged event fires after the resize is completed. Read more here.

The user can resize columns only if CanUserResizeColumns is set to True (this is its default value).

See Also

In this article