# Reordering Rows and Columns

## Content



Reordering of rows and columns is a very common scenario when handling and analyzing the data in a grid. FlexGrid provides reordering by dragging the header cells at run-time. The feature is available by default and user can drag and reorder the rows and columns both with a very smooth transition which is important to enhance the overall user experience.

![](https://cdn.mescius.io/document-site-files/images/1398d806-ac3c-4763-a9b3-2c7a2f5b49fb/images/reordercolumn.gif)

However, you can change this behavior to limit dragging only to rows, or columns or to disable it completely. This can be achieved by using the [AllowDragging](/componentone/docs/xamarin/online-ios/) property of the [FlexGrid](/componentone/api/xamarin/online-ios/dotnet-api/C1.iOS.Grid/C1.iOS.Grid.FlexGrid.html) class which accepts the values from [GridAllowDragging](/componentone/api/xamarin/online-ios/dotnet-api/C1.iOS.Grid/C1.iOS.Grid.GridAllowDragging.html) enumeration. You can also disable reordering of a particular row or column by setting the **AllowDragging** property of the [GridRow](/componentone/api/xamarin/online-ios/dotnet-api/C1.iOS.Grid/C1.iOS.Grid.GridRow.html) or [GridColumn](/componentone/api/xamarin/online-ios/dotnet-api/C1.iOS.Grid/C1.iOS.Grid.GridColumn.html) class respectively.

The following code snippet shows how you can disable column reordering in the FlexGrid control.

```csharp
// Disable column reordering
                        grid.AllowDragging = GridAllowDragging.None;
```