Skip to main content

PivotGridFieldCollectionBase.AddDataSourceColumn(String, PivotArea) Method

Adds a new field to the collection. The field is bound to the specified column in the data source and positioned in the specified PivotGrid area.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.PivotGrid.v24.2.Core.dll

NuGet Packages: DevExpress.PivotGrid.Core, DevExpress.Win.Navigation

#Declaration

public PivotGridFieldBase AddDataSourceColumn(
    string columnName,
    PivotArea area
)

#Parameters

Name Type Description
columnName String

A String that is the data source column name.

area PivotArea

A PivotArea enumeration member that specifies the PivotGrid area.

#Returns

Type
PivotGridFieldBase

#Remarks

In Optimized mode this method uses the Data Binding API and creates a PivotGrid field with the DataBinding property set to the DataSourceColumnBinding instance.

See Also