[]
        
(Showing Draft Content)

GrapeCity.Spreadsheet.Commands.PivotTables.PivotTableCommand.KeepOnlySelectedItems

KeepOnlySelectedItems Method

KeepOnlySelectedItems(IPivotTable, int, IRange)

Creates a command that filters the specified field to display only the items selected in the given range.

Declaration
public static Command KeepOnlySelectedItems(IPivotTable pivotTable, int fieldIndex, IRange range)
Public Shared Function KeepOnlySelectedItems(pivotTable As IPivotTable, fieldIndex As Integer, range As IRange) As Command
Parameters
Type Name Description
IPivotTable pivotTable

The IPivotTable instance.

int fieldIndex

The index of the IPivotField to apply the filter to.

IRange range

The IRange containing the selected items.

Returns
Type Description
Command

A Command that keeps only the selected items visible for the specified field.