By default, rows and columns are visible on a sheet. You can hide rows or columns in a sheet so that they are not displayed. You can also hide row headers and column headers. You hide a row or column by setting the Row.Visible property or Column.Visible property to false. The hidden rows or columns are not displayed at run time, but during design time, they are still visible.
When you hide a row or column, the size of the row or column is remembered by the FarPoint Spread component. If you redisplay the row or column, it is displayed at the size it was before it was hidden. For example, if the width of a column is 100 pixels and you hide the column, when you redisplay it, the width is 100.
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 methods of the sheet. For example, to find out if a column appears, use the GetViewportLeftColumn and GetViewportRightColumn methods to determine the left-most and right-most columns in the viewport and then determine if the column falls within those indexes.
For information on hiding rows or columns in headers, refer to Showing or Hiding Headers.
For more information on hiding rows or columns using the Spread Designer, refer to the Spread Designer Guide.
Return to Working with the Rows and Columns.
Using the Properties Window
- At design time, in the Properties window, select the FarPoint Spread component.
- Select the Sheet collection.
- Select the Row or Column collection.
- Click or a row or column to select it and then select an option from the drop-down combo list for the Visible property.
//Another option is to use the Visible property.
fpSpread1.Sheets.Columns.Visible = false;
fpSpread1.Sheets.Rows.Visible = true;
'Another option is to use the Visible property.
FpSpread1.Sheets(0).Columns(1).Visible = True
FpSpread1.Sheets(0).Rows(1).Visible = False
Using the Spread Designer
- Select the row or column by clicking on the header.
- Select an option from the Visible drop-down combo list.
- From the File menu, select Save and Exit to save the changes.