# Adding an Unbound Row to a Bound Sheet

Learn how to add unbound rows to a bound sheet in Spread.NET using shortcut methods and code examples.

## Content

Once you bind a sheet to a data set you might want to add an unbound row to contain additional data.
The following figure shows a sheet in a Spread component that contains data from a data set and an unbound row at the bottom that calculates the averages.
![Sheet with unbound row](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/dsunbound.png)

## Using a Shortcut

1. Create your data set.
2. Set the **FpSpread** object's or **Sheet** object's [DataSource](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.DataSource.html) property equal to the data set.
3. Call the **Sheet** object's [AddUnboundRows](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.AddUnboundRows.html) method to specify where to add the unbound row.
4. Set properties for the unbound row.

**Example**
This example code binds the Spread component to a data set then adds an unbound row.

```csharp
// Bind the component to the data set.
fpSpread1.DataSource = dbDataSet;
// Add an unbound row.
fpSpread1.Sheets[0].AddUnboundRows(20, 1);
```

```vbnet
' Bind the component to the data set.
fpSpread1.DataSource = dbDataSet
' Add an unbound row.
fpSpread1.Sheets(0).AddUnboundRows(20, 1)
```

## Using Code

1. Create your data set.
2. Create a new **SheetView** object.
3. Set the **SheetView** object's [DataSource](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.DataSource.html) property equal to the data set.
4. Call the **SheetView** object's [AddUnboundRows](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.AddUnboundRows.html) method to specify where to add the unbound row.
5. Set properties for the unbound row.
6. Assign the **SheetView** object to a sheet in the component.

**Example**
This example code creates a bound **SheetView** object and adds an unbound row to it, then assigns it to a sheet in a Spread component.

```csharp
// Create a new SheetView object.
FarPoint.Win.Spread.SheetView newsheet = new FarPoint.Win.Spread.SheetView();
// Bind the SheetView object to the data set.
newsheet.DataSource = dataSet1;
// Add an unbound row.
newsheet.AddUnboundRows(20, 1);
// Assign the SheetView object to the first sheet.
fpSpread1.Sheets[0] = newsheet;
```

```vbnet
' Create a new SheetView object.
Dim newsheet As New FarPoint.Win.Spread.SheetView()
' Bind the SheetView object to the data set.
newsheet.DataSource = DataSet1
' Add an unbound row.
newsheet.AddUnboundRows(20, 1)
' Assign the SheetView object to the first sheet.
fpSpread1.Sheets(0) = newsheet
```

## See Also

[Adding a Row to a Bound Sheet](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-data-binding/spwin-databind-adds/spwin-databind-addrow)