# Handling Row Expansion

Learn how you can allows the end user to expand the rows that have more data or prevent them from expanding those rows using Spread for ASP.NET.

## Content

With a hierarchical display of data, as discussed in [Displaying Data as a Hierarchy](/spreadnet/docs/latest/online-asp/overview/spweb-devguide/spweb-databound/spweb-dbhierarchy), users can be allowed to expand the rows that have more data or they can be prevented from expanding those rows. Use the [GetRowExpandable](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.GetRowExpandable.html) and [SetRowExpandable](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.SetRowExpandable.html) properties of the sheet (or in the sheet models) to control the ability of users to expand the rows.
You can customize the icons for expanding and collapsing hierarchies. For more information, refer to [Customizing the Graphical Interface](/spreadnet/docs/latest/online-asp/overview/spweb-devguide/spweb-interaction/spweb-interact-control/spweb-customicons).

## Using a Shortcut

Set the [SetRowExpandable](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.SetRowExpandable.html) method.

## Example

This example code sets the [SetRowExpandable](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.SetRowExpandable.html) method.

```csharp
FpSpread1.Sheets[0].DataSource = ds;
FpSpread1.Sheets[0].SetRowExpandable(0, false);
```

```vbnet
FpSpread1.Sheets(0).DataSource = ds
FpSpread1.Sheets(0).SetRowExpandable(0, False)
```

## See Also

[DataSource Property](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.DataSource.html)
[Displaying Data as a Hierarchy](/spreadnet/docs/latest/online-asp/overview/spweb-devguide/spweb-databound/spweb-dbhierarchy)