PivotGridControl.GetColumnIndex(Object[]) Method
Returns the index of the specified column.
Namespace: DevExpress.XtraPivotGrid
Assembly: DevExpress.XtraPivotGrid.v18.2.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 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.
C# | Visual Basic | Return Value |
---|---|---|
pivotGridControl.GetColumnIndex(new object[] {1995}); |
pivotGridControl.GetColumnIndex(New Object() {1995}) |
2 |
pivotGridControl.GetColumnIndex(new object[] {1995, "Beverages"}); |
pivotGridControl.GetColumnIndex(New Object() {1995, "Beverages"}) |
0 |
pivotGridControl.GetColumnIndex(new object[] {1995, "Condiments"}); |
pivotGridControl.GetColumnIndex(New Object() {1995, "Condiments"}) |
1 |
To obtain the index of a particular row, use the PivotGridControl.GetRowIndex method.
See Also