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.v24.2.dll
NuGet Package: DevExpress.Wpf.PivotGrid
Declaration
Parameters
Name | Type | Description |
---|---|---|
area | FieldArea | 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
Type | Description |
---|---|
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.