Back to Devexpress

PivotGridControl.ExpandValueAsync(Boolean, Object[]) Method

wpf-devexpress-dot-xpf-dot-pivotgrid-dot-pivotgridcontrol-dot-expandvalueasync-x28-system-dot-boolean-system-dot-object-x29.md

latest3.8 KB
Original Source

PivotGridControl.ExpandValueAsync(Boolean, Object[]) Method

Expands the specified column or row asynchronously.

Namespace : DevExpress.Xpf.PivotGrid

Assembly : DevExpress.Xpf.PivotGrid.v25.2.dll

NuGet Package : DevExpress.Wpf.PivotGrid

Declaration

csharp
public Task<bool> ExpandValueAsync(
    bool isColumn,
    object[] values
)
vb
Public Function ExpandValueAsync(
    isColumn As Boolean,
    values As Object()
) As Task(Of Boolean)

Parameters

NameTypeDescription
isColumnBoolean

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

| | values | Object[] |

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

|

Returns

TypeDescription
Task<Boolean>

An asynchronous operation that returns true in case of success.

|

Remarks

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

Consider the following PivotGridControl:

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

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

The image below shows the result:

To expand a column or row synchronously, use the PivotGridControl.ExpandValue method.

To collapse a column or row, use the PivotGridControl.CollapseValueAsync (asynchronous) or PivotGridControl.CollapseValue (synchronous) method.

See Also

ExpandValue(Boolean, Object[])

CollapseValue(Boolean, Object[])

CollapseValueAsync

PivotGridControl Class

PivotGridControl Members

DevExpress.Xpf.PivotGrid Namespace