PivotGridControl.GetColumnIndex(Object[]) Method

Returns the index of the specified column.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v21.1.dll


public int GetColumnIndex(
    params object[] values


Name Type Description
values Object[]

An array of column field values that identify the column.


Type Description

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


Pivot Grid columns and rows are indexed as shown below:


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