# Input Data in Rows or Columns

Learn how to restrict user data entry in rows and columns in your spreadsheet. Set the size, hide, or freeze rows and columns for a seamless user experience.

## Content

You can restrict the portion of the sheet in which the user can enter data. You can set the size of the sheet in terms of rows and columns. You can hide rows or columns so the user does not have access to them at all, or set them as frozen so that users can see them but cannot move them out of view by scrolling. For more information on hidden rows and columns, refer to [Showing or Hiding a Row or Column](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcolhide). For information on frozen rows and columns, refer to [Setting Fixed (Frozen) Rows or Columns](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcol-freeze). For information on setting the number of rows and columns in a sheet, refer to [Customizing the Number of Rows or Columns](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcolnumber).
You can restrict the user from entering data beyond the data already in the sheet. Set the [RestrictRows](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.RestrictRows.html) property and [RestrictColumns](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.RestrictColumns.html) property to restrict or allow the user to enter data in a row or column on a sheet that is more than one row or column beyond the last row or column that contains data.

## Using the Properties Window

1. At design time, in the **Properties** window, select the sheet.
2. In the **Behavior** category, select the [RestrictRows](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.RestrictRows.html) or the [RestrictColumns](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.RestrictColumns.html) property.
3. Click the drop-down arrow to display the choices and select the value (True or False). Repeat this for each property.

## Method to set

Set the [RestrictRows](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.RestrictRows.html) or [RestrictColumns](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.RestrictColumns.html) property for the sheet.

## Example

```csharp
fpSpread1.ActiveSheet.RestrictColumns = true;
fpSpread1.ActiveSheet.RestrictRows = true;
```

```vbnet
fpSpread1.ActiveSheet.RestrictColumns = True
fpSpread1.ActiveSheet.RestrictRows = True
```

## Using the Spread Designer

1. Select **Sheet** from the drop-down combo list located on the top right side of the Designer.
2. From the **Behavior** section, select **True** or **False** for **RestrictRows** or **RestrictColumns**.
3. From the **File** menu, select **Save and Exit** to save the changes.

## See Also

[Rows and Columns](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol)
[Customizing the Number of Rows or Columns](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcolnumber)
[Adding a Row or Column](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcoladd)
[Removing a Row or Column](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcolremove)
[Showing or Hiding a Row or Column](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcolhide)
[Setting the Row Height or Column Width](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcolsize)
[Setting Fixed (Frozen) Rows or Columns](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcol-freeze)
[Moving Rows or Columns](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcol-usermove)
[Creating Alternating Rows](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcolalt)
[Setting up Preview Rows](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-previewrow)
[Rows or Columns That Have Data](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcolnonempty)
[Adding a Tag to a Row or Column](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-tags-rowcol)