Back to Devexpress

PivotGridFieldBase.SetAreaPosition(PivotArea, Int32) Method

corelibraries-devexpress-dot-xtrapivotgrid-dot-pivotgridfieldbase-dot-setareaposition-x28-devexpress-dot-xtrapivotgrid-dot-pivotarea-system-dot-int32-x29.md

latest3.4 KB
Original Source

PivotGridFieldBase.SetAreaPosition(PivotArea, Int32) Method

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

Namespace : DevExpress.XtraPivotGrid

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

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

Declaration

csharp
public bool SetAreaPosition(
    PivotArea area,
    int areaIndex
)
vb
Public Function SetAreaPosition(
    area As PivotArea,
    areaIndex As Integer
) As Boolean

Parameters

NameTypeDescription
areaPivotArea

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

TypeDescription
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

AllowedAreas

IsAreaAllowed(PivotArea)

PivotGridFieldBase Class

PivotGridFieldBase Members

DevExpress.XtraPivotGrid Namespace