Skip to main content

PivotGridFieldBase.SetAreaPosition(PivotArea, Int32) Method

Positions the field in the specified area and at the specified location.

Namespace: DevExpress.XtraPivotGrid

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

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

#Declaration

public bool SetAreaPosition(
    PivotArea area,
    int areaIndex
)

#Parameters

Name Type Description
area PivotArea

A PivotArea value that specifies the area in which the field is placed.

areaIndex Int32

A zero-based integer that specifies the field’s index amongst the other fields displayed within the same area.

#Returns

Type Description
Boolean

true if the field has been successfully moved to the specified position; otherwise, false.

#Remarks

Each field can be positioned within one of four areas: Filter Header Area, Column Header Area, Row Header Area and Data Header Area.

Use the SetAreaPosition method to position the current field in a specific area at a specific location. This method sets the PivotGridFieldBase.Area and PivotGridFieldBase.AreaIndex properties as a result.

If the field hasn’t been moved to the specified position the SetAreaPosition method returns false. Otherwise, the method returns true.

There are two reasons the SetAreaPosition method returns false:

See Also