Skip to main content
.NET Framework 4.5.2+

PivotPageField Interface

Represents a reference to a PivotField object that is currently shown as a page field.

Namespace: DevExpress.Spreadsheet

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


public interface PivotPageField :


The PivotPageField object is a member of the PivotPageFieldCollection collection, which stores all page fields of a PivotTable report. An individual PivotPageField object can be accessed by its name or index in the collection using the PivotPageFieldCollection.Item property.

To add a PivotField to the PivotTable’s report filter area, use the PivotPageFieldCollection.Add method.

View Example

Dim sourceWorksheet As Worksheet = workbook.Worksheets("Data1")
Dim worksheet As Worksheet = workbook.Worksheets.Add()
workbook.Worksheets.ActiveWorksheet = worksheet

' Create a pivot table.
Dim pivotTable As PivotTable = worksheet.PivotTables.Add(sourceWorksheet("A1:D41"), worksheet("B2"))

' Add the "Product" field to the row axis area.
' Add the "Category" field to the column axis area.
' Add the "Sales" field to the data area and specify the custom field name.
Dim dataField As PivotDataField = pivotTable.DataFields.Add(pivotTable.Fields("Sales"), "Sales(Sum)")
' Specify the number format for the "Sales" field.
dataField.NumberFormat = "_([$$-409]* #,##0.00_);_([$$-409]* (#,##0.00);_([$$-409]* "" - ""??_);_(@_)"
' Add the "Region" field to the filter area.

To re-order fields in the report filter area, use the PivotFieldReferenceBase.MoveDown, PivotFieldReferenceBase.MoveUp, PivotFieldReferenceBase.MoveToBeginning or PivotFieldReferenceBase.MoveToEnd method of the PivotPageField object whose position you wish to change.

To remove a page field from the pivot table, use the PivotPageFieldCollection.Remove or PivotPageFieldCollection.RemoveAt method.

See Also