# Resizing Columns/Rows

## Content



FlexGrid's [AllowResizing](/componentone/api/xamarin/online-forms/dotnet-api/C1.Xamarin.Forms.Grid/C1.Xamarin.Forms.Grid.GridBase.AllowResizing.html) property allows a user to resize columns/rows by simply touching and dragging the handle between two columns/rows. This property accepts the values from the [GridAllowResizing](/componentone/api/xamarin/online-forms/dotnet-api/C1.Xamarin.Forms.Grid/C1.Xamarin.Forms.Grid.GridAllowResizing.html) enum that specifies a value to define which elements can be resized.

You can set the **AllowResizing** property of FlexGrid to **None** in case you want to restrict resizing at runtime.

#### In Code

```csharp
grid.AllowResizing = GridAllowResizing.None;
```

#### In XAML

```csharp
<c1:FlexGrid x:Name="grid"  AutoGenerateColumns="False" AllowResizing="None">
```

The resizing functionality for columns/rows is useful when a user wants to add data in FlexGrid. The user can simply resize the column/row as per the requirement directly on the device without requiring to change or set the width in code.

The following code example demonstrates how to set the **AllowResizing** property in FlexGrid. The example uses sample created in the [Quick start](/componentone/docs/xamarin/online-forms/controls/OverviewFlexGrid/flexGridQuickStart) section.

#### In Code

```csharp
grid.AllowResizing = GridAllowResizing.Columns;
```

#### In XAML

```csharp
<c1:FlexGrid x:Name="grid"  AutoGenerateColumns="False" AllowResizing="Columns">
```