# 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/fb6b46a2-eac0-487c-84c3-5e1b4c7b1348/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/api/xamarin/online-forms/dotnet-api/C1.Xamarin.Forms.Grid/C1.Xamarin.Forms.Grid.GridBase.AllowDragging.html) property of the [FlexGrid](/componentone/api/xamarin/online-forms/dotnet-api/C1.Xamarin.Forms.Grid/C1.Xamarin.Forms.Grid.FlexGrid.html) class which accepts the values from [GridAllowDragging](/componentone/api/xamarin/online-forms/dotnet-api/C1.Xamarin.Forms.Grid/C1.Xamarin.Forms.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-forms/dotnet-api/C1.Xamarin.Forms.Grid/C1.Xamarin.Forms.Grid.GridRow.html) or [GridColumn](/componentone/api/xamarin/online-forms/dotnet-api/C1.Xamarin.Forms.Grid/C1.Xamarin.Forms.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;
```