Back to Devexpress

PivotGridControl.RetrieveFieldsAsync(FieldArea, Boolean) Method

wpf-devexpress-dot-xpf-dot-pivotgrid-dot-pivotgridcontrol-dot-retrievefieldsasync-x28-devexpress-dot-xpf-dot-pivotgrid-dot-fieldarea-system-dot-boolean-x29.md

latest4.1 KB
Original Source

PivotGridControl.RetrieveFieldsAsync(FieldArea, Boolean) Method

Creates PivotGridField objects for all columns in a data source and specifies the area and visibility of the fields. This method executes these actions asynchronously.

Namespace : DevExpress.Xpf.PivotGrid

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

NuGet Package : DevExpress.Wpf.PivotGrid

Declaration

csharp
public Task<bool> RetrieveFieldsAsync(
    FieldArea area,
    bool visible
)
vb
Public Function RetrieveFieldsAsync(
    area As FieldArea,
    visible As Boolean
) As Task(Of Boolean)

Parameters

NameTypeDescription
areaFieldArea

A FieldArea enumeration value that specifies the area to which the created fields are moved.

| | visible | Boolean |

true to show the created fields; otherwise, false.

|

Returns

TypeDescription
Task<Boolean>

An asynchronous operation that returns true in case of success.

|

Remarks

This overload clears the PivotGridControl.Fields collection and populates it with new PivotGridField objects, created for all columns in a data source. This overload moves the created fields to the area according to the area parameter. The visible parameter specifies whether these fields are made visible or hidden.

The RetrieveFieldsAsync method generates DataSourceColumnBinding objects for each Pivot Grid field in OLAP, Server, and Optimized modes. The Pivot Grid fields obtain their values from columns in the data source. The DataSourceColumnBinding.ColumnName property is set to the name of the data source column. The created fields are moved to the area specified by the area parameter. The visible parameter specifies whether these fields are created as visible or hidden.

The RetrieveFieldsAsync method is asynchronous. It starts executing the related operation in a background thread, and immediately returns control. The primary UI thread is not blocked, allowing the application to continue responding to end-user actions. For more information about the asynchronous mode, see Asynchronous Mode.

To create fields synchronously, use the RetrieveFields method.

See Also

RetrieveFields

Fields

Name

Asynchronous Mode

Fields

PivotGridControl Class

PivotGridControl Members

DevExpress.Xpf.PivotGrid Namespace