Back to Devexpress

PivotGridControl.GetColumnIndex(Object[]) Method

wpf-devexpress-dot-xpf-dot-pivotgrid-dot-pivotgridcontrol-dot-getcolumnindex-x28-system-dot-object-x29.md

latest2.2 KB
Original Source

PivotGridControl.GetColumnIndex(Object[]) Method

Returns the index of the specified column.

Namespace : DevExpress.Xpf.PivotGrid

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

NuGet Package : DevExpress.Wpf.PivotGrid

Declaration

csharp
public int GetColumnIndex(
    params object[] values
)
vb
Public Function GetColumnIndex(
    ParamArray values As Object()
) As Integer

Parameters

NameTypeDescription
valuesObject[]

An array of column field values that identify the column.

|

Returns

TypeDescription
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 UsageReturn 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

GetRowIndex

PivotGridControl Class

PivotGridControl Members

DevExpress.Xpf.PivotGrid Namespace