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+
Row

PivotItem.Visible Property

Gets or sets a value indicating whether the item should be displayed in the report.

Namespace: DevExpress.Spreadsheet

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

Declaration

bool Visible { get; set; }
Property Visible As Boolean
bool Visible { get; set; }
Property Visible As Boolean

Property Value

Type Description
Boolean

true, if the item is visible; otherwise, false.

Property Value

Type Description
Boolean

true, if the item is visible; otherwise, false.

Remarks

Use the Visible property to control the visibility of items in a PivotTable field. The following example demonstrates how to hide the first item in the "Product" row field.

Dim worksheet As Worksheet = workbook.Worksheets("Report4")
workbook.Worksheets.ActiveWorksheet = worksheet

' Access the pivot table by its name in the collection.
Dim pivotTable As PivotTable = worksheet.PivotTables("PivotTable1")
' Access items of the "Product" field.
Dim pivotFieldItems As PivotItemCollection = pivotTable.Fields(1).Items

' Hide the first item in the "Product" field.
pivotFieldItems(0).Visible = False

To hide all items in a PivotTable field except one, use the PivotField.ShowSingleItem method.

To restore the display of all hidden items in a pivot field, call the PivotField.ShowAllItems method.

See Also