Skip to main content

PivotGridControl.RetrieveFieldsAsync() Method

Creates PivotGridField objects for all columns in a data source asynchronously.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v24.1.dll

NuGet Package: DevExpress.Win.PivotGrid

Declaration

public Task<bool> RetrieveFieldsAsync()

Returns

Type Description
Task<Boolean>

An asynchronous operation that returns true in case of success.

Remarks

This method clears the field collection and adds new PivotGridField objects to the collection for all columns in the control’s bound data source.

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 DataSourceColumnBindingBase.ColumnName property is set to the name of the data source column. The created fields are made visible and displayed within the Filter Header Area.

Refer to the following topic for more information about Pivot Grid fields: Pivot Grid Fields.

The RetrieveFieldsAsync method is asynchronous. RetrieveFieldsAsync starts to execute the related operation in a background thread, and returns the Pivot Grid control. The main UI thread remains unblocked to allow the application to continue responding to user actions. Refer to the following topic for more information: Asynchronous Mode.

Use the PivotGridControl.RetrieveFields method to create fields synchronously.

Specify a value of the PivotGridFieldBase.Name property for each field when you create Pivot Grid fields. You can use this value to set fields in a stored layout.

Refer to the RetrieveFieldsAsync(PivotArea, Boolean) overload for a code example.

See Also