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

PivotGridControl.ChangeFieldExpandedAsync(PivotGridFieldBase, Boolean) Method

Expands or collapses all values of the specified field asynchronously.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v19.1.dll

Declaration

public void ChangeFieldExpandedAsync(
    PivotGridFieldBase field,
    bool expand
)

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.

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.

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

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