Skip to main content

PivotGridControl.GetColumnIndex(Object[]) Method

Returns the index of the specified column.

Namespace: DevExpress.Xpf.PivotGrid

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

NuGet Package: DevExpress.Wpf.PivotGrid

Declaration

public int GetColumnIndex(
    params object[] values
)

Parameters

Name Type Description
values Object[]

An array of column field values that identify the column.

Returns

Type Description
Int32

An integer value that specifies the column index. -1 if the specified column has not been not found.

Remarks

Pivot Grid columns and rows are indexed as shown below:

PivotGrid_GetColumnIndex

If the specified field value array identifies several columns, the GetColumnIndex method returns the smallest index.

The following table demonstrates how to use the GetColumnIndex method to obtain column indexes.

Method Usage Return Value
pivotGridControl.GetColumnIndex(1994) 3
pivotGridControl.GetColumnIndex(1994, "Beverages") 0
pivotGridControl.GetColumnIndex(1994, "Condiments") 1

To obtain the index of a particular row, use the PivotGridControl.GetRowIndex method.

See Also