Back to Devexpress

PivotGridControl.ExpandValue(Boolean, Object[]) Method

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

latest4.2 KB
Original Source

PivotGridControl.ExpandValue(Boolean, Object[]) Method

Expands 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 ExpandValue(
    bool isColumn,
    object[] values
)
vb
Public Sub ExpandValue(
    isColumn As Boolean,
    values As Object()
)

Parameters

NameTypeDescription
isColumnBoolean

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

| | values | Object[] |

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

|

Remarks

To expand a column or row asynchronously, use the PivotGridControl.ExpandValueAsync method.

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

Consider the following PivotGrid control:

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

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

The result of this operation is shown below:

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ExpandValue(Boolean, Object[]) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-pivotgrid-implement-sorting-by-summary-in-olap-mode/CS/XtraPivotGrid_OLAPSortBySummary/Form1.cs#L13

csharp
// that correspond to the nested columns.
pivotGridControl1.ExpandValue(true, new object[] { "Australia" });
// Obtains OLAP members corresponding to the Australia and Bendigo values.

winforms-pivotgrid-implement-sorting-by-summary-in-olap-mode/VB/XtraPivotGrid_OLAPSortBySummary/Form1.vb#L17

vb
' that correspond to the nested columns.
pivotGridControl1.ExpandValue(True, New Object() {"Australia"})
' Obtains OLAP members corresponding to the Australia and Bendigo values.

See Also

PivotGridControl Class

PivotGridControl Members

DevExpress.XtraPivotGrid Namespace