# Freezing Rows and Columns

Learn how you can freeze rows and columns in a spreadsheet using Spread for ASP.NET. They do not scroll when the user uses the scroll bar in the component.

## Content

Frozen rows and frozen columns do not scroll when the user uses the scroll bar or navigation keys in the component. This is useful if you need information in non-header rows or columns to stay visible regardless of where in the sheet the user navigates. Frozen rows and frozen columns are supported with Microsoft Internet Explorer (IE) and Mozilla Firefox when the FpSpread [EnableClientScript](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.FpSpread.EnableClientScript.html) property is true.

## Using the Properties Window

1. At design time, in the **Properties** window, select the FpSpread component.
2. Select the **Sheets** property.
3. Click the button to display the **SheetView Collection Editor**.
4. In the **Appearance** section, set the number of frozen rows or columns using **FrozenRowCount** or **FrozenColumnCount**.
5. Click **OK** to close the **SheetView Collection Editor**.

## Using a Shortcut

Set the [FrozenColumnCount](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.FrozenColumnCount.html) or [FrozenRowCount](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.FrozenRowCount.html) property in the sheet of the component.

## Example

This example code sets [FrozenColumnCount](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.FrozenColumnCount.html) and [FrozenRowCount](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.FrozenRowCount.html).

```csharp
FpSpread1.Sheets[0].FrozenColumnCount = 2;
FpSpread1.Sheets[0].FrozenRowCount = 1;
```

```vbnet
FpSpread1.Sheets(0).FrozenColumnCount = 2
FpSpread1.Sheets(0).FrozenRowCount = 1
```

## Using the Spread Designer

1. Select Sheet from the drop-down combo box to the right of the designer.
2. In the **Appearance** section, set the number for **FrozenColumnCount** or **FrozenRowCount**.
3. From the **File** menu choose **Apply and Exit** to apply your changes to the component and exit Spread Designer.

## See Also

[EnableClientScript Property](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.FpSpread.EnableClientScript.html)