# Showing or Hiding a Row or Column

Learn how to show or hide rows and columns in your spreadsheet with simple methods and properties.

## Content

You can choose to show or hide rows and columns in a sheet by following one of the methods below:

* Set the Row.[Visible](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Row.Visible.html) property or Column.[Visible](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Column.Visible.html) property. The properties accept boolean values and hide a row or column when set to false.
* Set the [SetColumnVisible](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.SetColumnVisible.html) or [SetRowVisible](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.SetRowVisible.html) methods of SheetView class to show or hide rows and columns.
* Set the row height or column width to zero by using the [RowHeight](/spreadnet/api/latest/online-win/GrapeCity.Spreadsheet/GrapeCity.Spreadsheet.IRange.RowHeight.html) and [ColumnWidth](/spreadnet/api/latest/online-win/GrapeCity.Spreadsheet/GrapeCity.Spreadsheet.IRange.ColumnWidth.html) properties.

> !type=note
> **Note:** You can also hide row headers and column headers. For more information, refer to [Showing or Hiding Headers](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-header/spwin-headerhide).

The following code sample demonstrates the use of SheetView methods as well as Rows and Columns properties to hide the first row and the second column.

```csharp
//Using SheetView methods to set visibility
fpSpread1.Sheets[0].SetColumnVisible(1,false);
fpSpread1.Sheets[0].SetRowVisible(0,false);
//Another option - use the Visible property.
fpSpread1.Sheets[0].Columns[1].Visible = false;
fpSpread1.Sheets[0].Rows[0].Visible = false;
//Another option - set row height or column width to zero.
GrapeCity.Spreadsheet.IWorksheet sheet1 = fpSpread1.AsWorkbook().ActiveSheet
sheet1.Columns[1].ColumnWidth = 0;
sheet1.Rows[0].RowHeight = 0;
```

```vbnet
'Using SheetView methods to set visibility
fpSpread1.Sheets(0).SetColumnVisible(1, False)
fpSpread1.Sheets(0).SetRowVisible(0, False)
'Another option - use the Visible property.
fpSpread1.Sheets(0).Columns(1).Visible = False
fpSpread1.Sheets(0).Rows(0).Visible = False
'Another option - set row height or column width to zero.
GrapeCity.Spreadsheet.IWorksheet sheet1 = fpSpread1.AsWorkbook().ActiveSheet
sheet1.Columns(1).ColumnWidth = 0
sheet1.Rows(0).RowHeight = 0
```

> !type=note
> **Note:** To know more about showing or hiding rows and columns by setting row height and column width, refer to [Setting the Row Height or Column Width](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcolsize#resize-hide).

By default, the width and height of hidden columns and rows are displayed by about 1 pixel when set to hidden. To eliminate this display, you need to set [ResizeZeroIndicator](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.ResizeZeroIndicator.html) to Default.
![](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/resize.png)
When you hide a row or column, the size of the row or column is remembered by the Spread component. If you re-display the row or column, it is displayed at the size it was before it was hidden.
Conversely, you can also prevent the user to re-display the hidden rows or columns by setting the Row.[Resizable](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Row.Resizable.html) or Column.[Resizable](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Column.Resizable.html) properties to false.
If you want to determine if a row or column is presently visible to the user, that is, whether it appears in the viewport that is currently being displayed, you can use the [FpSpread class methods](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.html). For more information refer to [Customizing Viewports](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssojbects/spwin-sheetviewports).

## Using the Properties Window

1. At design time, in the **Properties** window, select the Spread component.
2. Select the **Sheet** collection.
3. Select the **Row** or **Column** collection.
4. Click on a row or column to select it and then select an option from the drop-down combo list for the **Visible** property.

## Using the Spread Designer

1. Select the row or column by clicking on the header.
2. Select an option from the **Visible** drop-down combo list.
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)
[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)
[Input Data in Rows or Columns](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcol-userentry)
[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)
[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)
[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)
[Input Data in Rows or Columns](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcol-userentry)
[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)