By default end users can easily reorder columns in the grid at run time. For more information, see Reordering Columns. If you choose, however, you can disable the column reordering feature by setting the CanUserReorderColumns property to False.
At Design Time
To disable column reordering, complete the following steps:
1. Click the C1DataGrid control once to select it.
2. Navigate to the Properties window and locate the CanUserReorderColumns property.
3. Clear the check box next to the CanUserReorderColumns property.
In XAML
For example to disable column reordering, add CanUserReorderColumns="False" to the < c1:C1DataGrid> tag so that it appears similar to the following:
<c1:C1DataGrid Name="c1datagrid1" Height="180" Width="250" CanUserReorderColumns="False" />
In Code
For example, to disable column reordering, add the following code to your project:
Me.C1DataGrid1.CanUserReorderColumns = False
•C#
this.c1DataGrid1.CanUserReorderColumns = false;
What You've Accomplished
Run the application and observe that you can no longer reorder columns at run time by preforming a drag-and-drop operation. For more information about column reordering, see the Reordering Columns topic.