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

PivotField.ShowSingleItem(Int32) Method

Displays the specified item in the PivotTable field.

Namespace: DevExpress.Spreadsheet

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

Declaration

void ShowSingleItem(
    int itemIndex
)
Sub ShowSingleItem(
    itemIndex As Integer
)
void ShowSingleItem(
    int itemIndex
)
Sub ShowSingleItem(
    itemIndex As Integer
)
void ShowSingleItem(
    int itemIndex
)
Sub ShowSingleItem(
    itemIndex As Integer
)

Parameters

Name Type Description
itemIndex Int32

A zero-based integer value that specifies the index of the item to be displayed. If it's negative or exceeds the number of items in the field, an exception is raised.

Parameters

Name Type Description
itemIndex Int32

A zero-based integer value that specifies the index of the item to be displayed. If it's negative or exceeds the number of items in the field, an exception is raised.

Parameters

Name Type Description
itemIndex Int32

A zero-based integer value that specifies the index of the item to be displayed. If it's negative or exceeds the number of items in the field, an exception is raised.

Remarks

Use the ShowSingleItem method to display a particular item in a PivotTable field located in a row, column or page area.

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")

' Show the first item in the "Product" field.
pivotTable.Fields(1).ShowSingleItem(0)

'Show all items in the "Product" field (the default option).
'pivotTable.Fields[1].ShowAllItems();

You can also control the visibility of field items by setting the PivotItem.Visible property to the required value for each item you wish to hide or display.

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

See Also