PivotFieldCollection Interface
Represents the collection of all fields in a PivotTable report.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v24.2.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
Declaration
public interface PivotFieldCollection :
ISimpleCollection<PivotField>,
IEnumerable<PivotField>,
IEnumerable,
ICollection
Related API Members
The following members return PivotFieldCollection objects:
Remarks
When you create a pivot table, the PivotFieldCollection collection is populated automatically based on information in the source data (or more precisely PivotCache). For example, if you use a cell range as a data source for your PivotTable report, each column in the source range will be treated as a separate field, and the column label will be used as the value of the PivotField.Name property.
Besides fields that originate from the source data, the PivotFieldCollection collection may also contain calculated fields and fields that appear as a result of grouping.
To return a collection of all fields in a specific PivotTable report, use the PivotTable.Fields property. An individual PivotTable field is represented by the PivotField object, which can be accessed by its name or index in the collection using the PivotFieldCollection.Item property.
If you need to return a subset of fields located in a specific area of a PivotTable report, use the following properties of the PivotTable object.
- PivotTable.RowFields returns the collection of row fields.
- PivotTable.ColumnFields returns the collection of column fields.
- PivotTable.DataFields returns the collection of data fields.
- PivotTable.PageFields returns the collection of page fields.
- PivotTable.CalculatedFields returns the collection of calculated fields.