# Allowing User Sorting

Learn how you can allow the user to sort the data in a spreadsheet using Spread for ASP.NET.

## Content

You can allow the user to sort with the [AllowSort](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.AllowSort.html) property. The following image shows the column after the user has double-clicked on the header.
![User Sorting](https://cdn.mescius.io/document-site-files/images/346c9178-0ed8-4fb9-908b-1565b22fb408/artwork/sortedcolumn.png)

## Using Code

Use the [AllowSort](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.AllowSort.html) property to allow user sorting.

## Example

The following example sets the [AllowSort](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.AllowSort.html) property.

```csharp
FarPoint.Web.Spread.SheetView sv = new FarPoint.Web.Spread.SheetView();
FpSpread1.ActiveSheetView.SetValue(0, 0, 9);
FpSpread1.ActiveSheetView.SetValue(1, 0, 5);
FpSpread1.ActiveSheetView.SetValue(2, 0, 7);
sv = FpSpread1.ActiveSheetView);
sv.AllowSort = true;
```

```vbnet
Dim sv As FarPoint.Web.Spread.SheetView
FpSpread1.ActiveSheetView.SetValue(0, 0, 9)
FpSpread1.ActiveSheetView.SetValue(1, 0, 5)
FpSpread1.ActiveSheetView.SetValue(2, 0, 7)
sv = FpSpread1.ActiveSheetView
sv.AllowSort = True
```

## Using the Spread Designer

1. Select the **Settings** menu in the **Sheet Settings** section.
2. Select the **General** icon.
3. Set the **AllowSort** check box.
4. Click **OK** to close the dialog.
5. Click **Apply and Exit** to close the Spread Designer.