.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

PivotFilter.Top10Type Property

Gets or sets the type of the "Top 10" value filter.

Namespace: DevExpress.Spreadsheet

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


PivotFilterTop10Type Top10Type { get; set; }

Property Value

Type Description

One of the PivotFilterTop10Type enumeration members.


Use the Top10Type property to specify what items (top or bottom) should be displayed in a field to which the "Top 10" filter is applied. If the Top10Type property is not specified, the PivotFilterTop10Type.Top value will be used by default.

The following example demonstrates how to apply the "Top 10" filter to the "Product" field to display two products with the lowest total sales.

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 the "Product" field.
Dim field As PivotField = pivotTable.Fields(1)
' Filter the "Product" field to display two products with the lowest sales.
Dim filter As PivotFilter = pivotTable.Filters.Add(field, pivotTable.DataFields(0), PivotFilterType.Count, 2)
filter.Top10Type = PivotFilterTop10Type.Bottom
See Also