Back to Devexpress

PivotGridField.AllowedAreas Property

wpf-devexpress-dot-xpf-dot-pivotgrid-dot-pivotgridfield-ebe6270d.md

latest4.4 KB
Original Source

PivotGridField.AllowedAreas Property

Gets or sets the areas within which the field can be positioned. This is a dependency property.

Namespace : DevExpress.Xpf.PivotGrid

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

NuGet Package : DevExpress.Wpf.PivotGrid

Declaration

csharp
public FieldAllowedAreas AllowedAreas { get; set; }
vb
Public Property AllowedAreas As FieldAllowedAreas

Property Value

TypeDescription
FieldAllowedAreas

A FieldAllowedAreas enumeration value (or a combination of values) that specifies in which areas the field can be positioned.

|

Available values:

NameDescription
RowArea

A field can be positioned within the Row Header Area.

| | ColumnArea |

A field can be positioned within the Column Header Area.

| | FilterArea |

A field can be positioned within the Filter Header Area.

| | DataArea |

A field can be positioned within the Data Header Area.

| | All |

A field can be positioned within any area.

|

Remarks

The AllowedAreas property can be used to prevent the current field from being dragged to a particular area. To do this, clear the corresponding flag in the AllowedAreas value.

The following code snippets (auto-collected from DevExpress Examples) contain references to the AllowedAreas property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-pivot-grid-hide-specific-columns-and-row/CS/WpfApp/Data.cs#L29

csharp
foreach (PivotGridField field in pivot.Fields) {
    field.AllowedAreas = GetAllowedArea(field.Area);
}

wpf-pivot-grid-split-field-value-cells/CS/Data.cs#L28

csharp
foreach (PivotGridField field in pivot.Fields) {
    field.AllowedAreas = GetAllowedArea(field.Area);
}

wpf-pivot-grid-hide-specific-columns-and-row/VB/WpfApp/Data.vb#L32

vb
For Each field As PivotGridField In pivot.Fields
    field.AllowedAreas = GetAllowedArea(field.Area)
Next field

wpf-pivot-grid-split-field-value-cells/VB/Data.vb#L40

vb
For Each field As PivotGridField In pivot.Fields
    field.AllowedAreas = GetAllowedArea(field.Area)
Next

See Also

Area

AreaIndex

IsAreaAllowed(FieldArea)

SetAreaPosition(FieldArea, Int32)

FieldAreaChanging

PivotGridField Class

PivotGridField Members

DevExpress.Xpf.PivotGrid Namespace