Skip to main content

ASPxPivotGrid.GetColumnIndex(Object[]) Method

Returns the index of the specified column.

Namespace: DevExpress.Web.ASPxPivotGrid

Assembly: DevExpress.Web.ASPxPivotGrid.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

public int GetColumnIndex(
    object[] values
)

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 indices as shown below:

GetColumnIndex

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
ASPxPivotGrid1.GetColumnIndex(new object[] {UK}); ASPxPivotGrid1.GetColumnIndex(New Object() {UK}) 3
ASPxPivotGrid1.GetColumnIndex(new object[] {"UK", "Anne Dodsworth"}); ASPxPivotGrid1.GetColumnIndex(New Object() {"UK", "Anne Dodsworth"}) 0
ASPxPivotGrid1.GetColumnIndex(new object[] {"UK", "Michael Suyama"}); ASPxPivotGrid1.GetColumnIndex(New Object() {"UK", "Michael Suyama"}) 1

To obtain the index of a particular row, use the ASPxPivotGrid.GetRowIndex method.

See Also