Back to Devexpress

PivotGridControl.GetFieldsByArea(FieldArea) Method

wpf-devexpress-dot-xpf-dot-pivotgrid-dot-pivotgridcontrol-dot-getfieldsbyarea-x28-devexpress-dot-xpf-dot-pivotgrid-dot-fieldarea-x29.md

latest3.2 KB
Original Source

PivotGridControl.GetFieldsByArea(FieldArea) Method

Returns a list of fields displayed in the specified area.

Namespace : DevExpress.Xpf.PivotGrid

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

NuGet Package : DevExpress.Wpf.PivotGrid

Declaration

csharp
public List<PivotGridField> GetFieldsByArea(
    FieldArea area
)
vb
Public Function GetFieldsByArea(
    area As FieldArea
) As List(Of PivotGridField)

Parameters

NameTypeDescription
areaFieldArea

A FieldArea enumeration value that specifies the required field area.

|

Returns

TypeDescription
List<PivotGridField>

The list of visible fields displayed in the specified area.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetFieldsByArea(FieldArea) method.

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-show-top-n-values-in-context-menu/CS/ContextMenuToShowTopN_Example/MainWindow.xaml.cs#L91

csharp
{
    var fields = valueItem.PivotGrid.GetFieldsByArea(valueItem.IsColumn ? FieldArea.RowArea : FieldArea.ColumnArea);
    if (fields.Count == 0)

wpf-pivot-grid-show-top-n-values-in-context-menu/VB/ContextMenuToShowTopN_Example/MainWindow.xaml.vb#L87

vb
Private Shared Function IsTopFiveValuesApplied(ByVal valueItem As FieldValueElementData) As Boolean
    Dim fields = valueItem.PivotGrid.GetFieldsByArea(If(valueItem.IsColumn, FieldArea.RowArea, FieldArea.ColumnArea))
    If fields.Count = 0 Then

See Also

GetFieldByArea(FieldArea, Int32)

PivotGridControl Class

PivotGridControl Members

DevExpress.Xpf.PivotGrid Namespace