Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PivotGridControl.CollapseValue(Boolean, Object[]) Method

Collapses the specified column or row.

Namespace: DevExpress.Xpf.PivotGrid

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

NuGet Package: DevExpress.Wpf.PivotGrid

#Declaration

public void CollapseValue(
    bool isColumn,
    params 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

Consider the following PivotGridControl:

pivotgrid_collapsevalue_1

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

pivotGrid.CollapseValue(true, "Aniseed Syrup", 1995);

The image below shows the result:

pivotgrid_collapsevalue_2

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.

See Also