Back to Devexpress

PivotGridFieldCollection.AddDataSourceColumn(String, FieldArea) Method

wpf-devexpress-dot-xpf-dot-pivotgrid-dot-pivotgridfieldcollection-dot-adddatasourcecolumn-x28-system-dot-string-devexpress-dot-xpf-dot-pivotgrid-dot-fieldarea-x29.md

latest3.6 KB
Original Source

PivotGridFieldCollection.AddDataSourceColumn(String, FieldArea) Method

Namespace : DevExpress.Xpf.PivotGrid

Assembly : DevExpress.Xpf.PivotGrid.v25.2.dll

NuGet Package : DevExpress.Wpf.PivotGrid

Declaration

csharp
public PivotGridField AddDataSourceColumn(
    string columnName,
    FieldArea area
)
vb
Public Function AddDataSourceColumn(
    columnName As String,
    area As FieldArea
) As PivotGridField

Parameters

NameType
columnNameString
areaFieldArea

Returns

Type
PivotGridField

The following code snippets (auto-collected from DevExpress Examples) contain references to the AddDataSourceColumn(String, FieldArea) 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.

wpf-pivot-grid-hide-specific-columns-and-row/CS/WpfApp/Data.cs#L21

csharp
public static void FillPivot(PivotGridControl pivot) {
    pivot.Fields.AddDataSourceColumn(Employee, FieldArea.RowArea);
    pivot.Fields.AddDataSourceColumn(Widget, FieldArea.RowArea);

wpf-pivot-grid-split-field-value-cells/CS/Data.cs#L21

csharp
public static void FillPivot(PivotGridControl pivot) {
    pivot.Fields.AddDataSourceColumn(Employee, FieldArea.RowArea);
    pivot.Fields.AddDataSourceColumn(Widget, FieldArea.RowArea);

wpf-pivot-grid-hide-specific-columns-and-row/VB/WpfApp/Data.vb#L24

vb
Public Shared Sub FillPivot(ByVal pivot As PivotGridControl)
    pivot.Fields.AddDataSourceColumn(Employee, FieldArea.RowArea)
    pivot.Fields.AddDataSourceColumn(Widget, FieldArea.RowArea)

wpf-pivot-grid-split-field-value-cells/VB/Data.vb#L33

vb
Public Sub FillPivot(ByVal pivot As PivotGridControl)
    pivot.Fields.AddDataSourceColumn(Employee, FieldArea.RowArea)
    pivot.Fields.AddDataSourceColumn(Widget, FieldArea.RowArea)

See Also

PivotGridFieldCollection Class

PivotGridFieldCollection Members

DevExpress.Xpf.PivotGrid Namespace