PivotGridFieldCollectionBase.SetFieldIndex(PivotGridFieldBase, Int32) Method

Sets the index of the specified field to the specified value.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.PivotGrid.v20.2.Core.dll

Declaration

public void SetFieldIndex(
    PivotGridFieldBase field,
    int newIndex
)
Public Sub SetFieldIndex(
    field As PivotGridFieldBase,
    newIndex As Integer
)

Parameters

Name Type Description
field PivotGridFieldBase

The PivotGridFieldBase object that should be moved to the specified location in the collection.

newIndex Int32

The new index of the specified field.

Remarks

The index of a field in the collection is specified by the PivotGridFieldBase.IndexOf property. This property and the SetFieldIndex method can be used to move the field to a new position.

To specify the field's visual position amongst the other fields within the same Area use the PivotGridFieldBase.AreaIndex property.

The SetFieldIndex method does nothing if the value of the newIndex parameter is less than 0 or greater than the number of the items in the collection.

See Also