The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+
Row

Worksheet.VisibilityType Property

Gets or sets whether the current worksheet is visible, hidden or "very hidden".

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v19.2.Core.dll

Declaration

WorksheetVisibilityType VisibilityType { get; set; }
Property VisibilityType As WorksheetVisibilityType
WorksheetVisibilityType VisibilityType { get; set; }
Property VisibilityType As WorksheetVisibilityType
WorksheetVisibilityType VisibilityType { get; set; }
Property VisibilityType As WorksheetVisibilityType

Property Value

Type Description
WorksheetVisibilityType

A WorksheetVisibilityType enumeration member that specifies the worksheet visibility type.

Property Value

Type Description
WorksheetVisibilityType

A WorksheetVisibilityType enumeration member that specifies the worksheet visibility type.

Property Value

Type Description
WorksheetVisibilityType

A WorksheetVisibilityType enumeration member that specifies the worksheet visibility type.

Remarks

Set the VisibilityType property to WorksheetVisibilityType.Hidden to hide the worksheet. Set it to WorksheetVisibilityType.Visible to show the previously hidden worksheet again. You can also accomplish this via the Worksheet.Visible property.

Also, the VisibilityType property provides you with the capability to make the worksheet “very hidden” (WorksheetVisibilityType.VeryHidden). This is a specific mode that does not allow the worksheet to be shown again by end-users. To make a "very hidden" worksheet visible again, set the VisibilityType property to WorksheetVisibilityType.Visible or Worksheet.Visible to true.

If you hide a worksheet that is currently active, the next visible worksheet to the right of this worksheet is automatically activated. If there are no visible worksheets to the right of the hidden worksheet, the first visible worksheet to the left of this worksheet becomes active.

Note

A workbook must always contain at least one visible worksheet.

Examples

This example demonstrates how to manage worksheet visibility in a workbook. To do this, use the following properties.

Note

A workbook must always contain at least one visible worksheet.

// Hide the worksheet under the "Sheet2" name and prevent end-users from unhiding it via user interface.
// To make this worksheet visible again, use the Worksheet.Visible property.
workbook.Worksheets["Sheet2"].VisibilityType = WorksheetVisibilityType.VeryHidden;

// Hide the "Sheet3" worksheet. 
// In this state a worksheet can be unhidden via user interface.
workbook.Worksheets["Sheet3"].Visible = false;
See Also