Skip to main content
A newer version of this page is available.
All docs
V19.1

PivotGridControl.ChangeFieldExpandedAsync(PivotGridFieldBase, Boolean, AsyncCompletedHandler) Method

Expands or collapses all values of the specified field asynchronously. Allows you to specify custom actions to be performed after this operation is completed.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v19.1.dll

Declaration

public void ChangeFieldExpandedAsync(
    PivotGridFieldBase field,
    bool expand,
    AsyncCompletedHandler asyncCompleted
)

Parameters

Name Type Description
field PivotGridFieldBase

A PivotGridFieldBase descendant that specifies the field whose values should be expanded/collapsed.

expand Boolean

true to expand field values; false to collapse them.

asyncCompleted AsyncCompletedHandler

A AsyncCompletedHandler delegate, referencing a method that should be executed after the operation is completed.

Remarks

The ChangeFieldExpandedAsync 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 collapse or expand all values of a particular field synchronously, use the PivotGridFieldBase.CollapseAll and PivotGridFieldBase.ExpandAll methods, respectively.

To collapse or expand a specific field value, use the PivotGridControl.CollapseValueAsync and PivotGridControl.ExpandValueAsync methods, respectively (or the PivotGridControl.CollapseValue and PivotGridControl.ExpandValue methods, to do this synchronously).

Field values can be collapsed and expanded by end-users, if the field’s PivotGridFieldOptions.AllowExpand property is set to true.

See Also