Back to Devexpress

PivotGridControl.CollapseValue(Boolean, Object[]) Method

windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridcontrol-dot-collapsevalue-x28-system-dot-boolean-system-dot-object-x29.md

latest3.1 KB
Original Source

PivotGridControl.CollapseValue(Boolean, Object[]) Method

Collapses a specific column or row that is identified by the specified values.

Namespace : DevExpress.XtraPivotGrid

Assembly : DevExpress.XtraPivotGrid.v25.2.dll

NuGet Package : DevExpress.Win.PivotGrid

Declaration

csharp
public void CollapseValue(
    bool isColumn,
    object[] values
)
vb
Public Sub CollapseValue(
    isColumn As Boolean,
    values As Object()
)

Parameters

NameTypeDescription
isColumnBoolean

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

| | values | Object[] |

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

|

Remarks

To collapse a column or row asynchronously, use the PivotGridControl.CollapseValueAsync method.

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

Consider the following PivotGrid control:

To collapse the “Austria” column (within the “Alice Mutton” column), use the following code:

csharp
pivotGridControl1.CollapseValue(true, new object[] {"Alice Mutton", "Austria"});
vb
pivotGridControl1.CollapseValue(True, New Object() {"Alice Mutton", "Austria"})

The result of this operation is shown below:

See Also

ExpandValue(Boolean, Object[])

CollapseValue(Object)

PivotGridFieldBase.CollapseAll

PivotGridControl.CollapseAll

PivotGridControl Class

PivotGridControl Members

DevExpress.XtraPivotGrid Namespace