windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridfieldcollection.md
Appends a new field to the collection.
Namespace : DevExpress.XtraPivotGrid
Assembly : DevExpress.XtraPivotGrid.v25.2.dll
NuGet Package : DevExpress.Win.PivotGrid
public PivotGridField Add()
Public Function Add As PivotGridField
| Type | Description |
|---|---|
| PivotGridField |
The PivotGridField object added to the collection.
|
This method creates a new PivotGridField object, initializes it with default settings and appends it to the collection.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Add() method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-pivot-grid-display-kpi-graphics/CS/WindowsFormsApp_RegularDataSourceKPI/Form1.cs#L14
// Creates a new "Status" field to show KPI values.
PivotGridField KPIField = pivotGridControl1.Fields.Add();
KPIField.Area = PivotArea.DataArea;
winforms-pivot-grid-display-kpi-graphics/VB/WindowsFormsApp_RegularDataSourceKPI/Form1.vb#L18
' Creates a new "Status" field to show KPI values.
Dim KPIField As PivotGridField = pivotGridControl1.Fields.Add()
KPIField.Area = PivotArea.DataArea
See Also
PivotGridFieldCollection Class