PivotGridControl.GetColumnIndex(Object[]) Method
Returns the index of the specified column.
Namespace: DevExpress.Xpf.PivotGrid
Assembly: DevExpress.Xpf.PivotGrid.v19.1.dll
Declaration
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:
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.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetColumnIndex(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.