PivotGridControl.CollapseValueAsync(Boolean, Object[], AsyncCompletedHandler) Method
Collapses the specified column or row asynchronously. Allows you to specify custom actions to be performed after this operation is completed.
Namespace: DevExpress.XtraPivotGrid
Assembly: DevExpress.XtraPivotGrid.v19.2.dll
Declaration
public void CollapseValueAsync(
bool isColumn,
object[] values,
AsyncCompletedHandler asyncCompleted
)
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. |
asyncCompleted | AsyncCompletedHandler | A AsyncCompletedHandler delegate referencing a method that should be executed after the operation is completed. |
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.
Consider the following PivotGrid control:
To collapse the “Austria” column (within the “Alice Mutton” column), use the following code:
pivotGridControl1.CollapseValueAsync(true,
new object[] {"Alice Mutton", "Austria"},
delegate(AsyncOperationResult result) {
// ...
});
The result of this operation is shown below:
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.