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

PivotGridControl.CollapseValueAsync(Boolean, Object[]) Method

Collapses the specified column or row asynchronously.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v19.1.dll

Declaration

public void CollapseValueAsync(
    bool isColumn,
    object[] values
)

Parameters

Name Type Description
isColumn Boolean

true to collapse a column; false to collapse a row.

values Object[]

An array of field values that identify the column/row to be collapsed.

Remarks

The CollapseValueAsync 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 CollapseValueAsync method that takes the asyncCompleted parameter, and pass a delegate that performs the required actions as this parameter.

Consider the following PivotGridControl:

pivotgrid_collapsevalue_1

To collapse ‘1995’ within “Aniseed Syrup”, do the following:

pivotGrid.CollapseValueAsync(true, new object[] { "Aniseed Syrup", 1995 });

The image below shows the result:

pivotgrid_collapsevalue_2

To collapse a column or row synchronously, use the PivotGridControl.CollapseValue method.

To expand a column or row, use the PivotGridControl.ExpandValueAsync (asynchronous) or PivotGridControl.ExpandValue (synchronous) method.

See Also