PivotGridControl.GetRowIndex(Object[]) Method
Returns the index of the specified row.
Namespace: DevExpress.XtraPivotGrid
Assembly: DevExpress.XtraPivotGrid.v18.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
values | Object[] | An array of row field values that identify the row. |
Returns
Type | Description |
---|---|
Int32 | An integer value that specifies the row index. -1 if the specified row has not been not found. |
Remarks
Pivot Grid columns and rows are indexed as shown below:
If the specified field value array identifies several rows, the GetRowIndex method returns the smallest index.
The following table demonstrates how to use the GetRowIndex method to obtain row indexes.
C# | Visual Basic | Return Value |
---|---|---|
pivotGridControl.GetRowIndex(new object[] {"Brazil"}); |
pivotGridControl.GetRowIndex(New Object() {"Brazil"}) |
2 |
pivotGridControl.GetRowIndex(new object[] {"Brazil", "Rio de Janeiro"}); |
pivotGridControl.GetRowIndex(New Object() {"Brazil", "Rio de Janeiro"}) |
0 |
pivotGridControl.GetRowIndex(new object[] {"France", "Marseille"}); |
pivotGridControl.GetRowIndex(New Object() {"France", "Marseille"}) |
3 |
To obtain the index of a particular column, use the PivotGridControl.GetColumnIndex method.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetRowIndex(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.