Skip to main content

PivotGridGroup.ChangeFieldIndex(PivotGridFieldBase, Int32) Method

Moves the specified field to the specified position within the group.

Namespace: DevExpress.XtraPivotGrid

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

NuGet Packages: DevExpress.PivotGrid.Core, DevExpress.Win.Navigation

#Declaration

public void ChangeFieldIndex(
    PivotGridFieldBase field,
    int newIndex
)

#Parameters

Name Type Description
field PivotGridFieldBase

A PivotGridFieldBase object which represents the field to move.

newIndex Int32

An integer value specifying the new position of the field within the group.

#Remarks

Calling the ChangeFieldIndex method has no effect in the cases listed below:

  • the field doesn’t belong to the current group;
  • the newIndex parameter matches the index of the specified field;
  • the newIndex parameter is less than 0 or exceeds the number of fields in the group.
See Also