Skip to main content
A newer version of this page is available. .

PivotGridControl.RetrieveFieldsAsync(PivotArea, Boolean) Method

Creates PivotGridField objects for all fields in a data source, and moves them to the specified area, making them visible or hidden. Performs these actions asynchronously.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v19.1.dll

Declaration

public void RetrieveFieldsAsync(
    PivotArea area,
    bool visible
)

Parameters

Name Type Description
area PivotArea

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

visible Boolean

true to show the created fields; otherwise, false.

Remarks

This overload clears the PivotGridControl.Fields collection and populates it with new PivotGridField objects, created for all fields in a data source. The PivotGridFieldBase.FieldName property of each field is set to the name of the corresponding data source field. The created fields are moved to the area specified by the area parameter. The visible parameter specifies whether these fields are made visible or hidden.

To learn more about fields, see Pivot Grid Fields.

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.

If you need to perform specific actions after this operation is completed, use another overload of the RetrieveFieldsAsync method that takes the asyncCompleted parameter, and pass a delegate that performs the required actions as this parameter.

To retrieve fields synchronously, use the PivotGridControl.RetrieveFields method.

See Also