Back to Devexpress

PivotGridOptionsDataField.AreaIndex Property

corelibraries-devexpress-dot-xtrapivotgrid-dot-pivotgridoptionsdatafield-740fabb7.md

latest7.1 KB
Original Source

PivotGridOptionsDataField.AreaIndex Property

Gets or sets the position of the data field headers.

Namespace : DevExpress.XtraPivotGrid

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

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

Declaration

csharp
[DefaultValue(-1)]
public int AreaIndex { get; set; }
vb
<DefaultValue(-1)>
Public Property AreaIndex As Integer

Property Value

TypeDefaultDescription
Int32-1

An integer which specifies the position of the data field headers within the hierarchy of field values.

|

Property Paths

You can access this nested property as listed below:

LibraryObject TypePath to AreaIndex
WinForms ControlsPivotGridControl

.OptionsDataField .AreaIndex

| | .NET Reporting Tools | XRPivotGrid |

.OptionsDataField .AreaIndex

|

Remarks

Data field headers are displayed when the XtraPivotGrid control contains two or more data fields. By default, the AreaIndex property is set to -1 , so the data field headers are displayed immediately above the Data Area when they are positioned within the column area (or immediately to the left of the Data Area when positioned within the row area):

Setting the AreaIndex property to 0 displays data field headers above the field values of the first column field:

If the AreaIndex property is set to 1 the data field headers will be displayed under the field values of the first column field, as in the image below:

The following code snippets (auto-collected from DevExpress Examples) contain references to the AreaIndex 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.

winforms-pivot-grid-hide-specific-columns-and-rows/CS/Data.cs#L35

csharp
pivot.OptionsDataField.Area = PivotDataArea.ColumnArea;
    pivot.OptionsDataField.AreaIndex = 1;
}

winforms-pivot-split-field-value-cells/CS/Data.cs#L33

csharp
pivot.OptionsDataField.Area = PivotDataArea.ColumnArea;
    pivot.OptionsDataField.AreaIndex = 1;
}

winforms-pivot-grid-hide-empty-columns-and-rows/CS/Data.cs#L34

csharp
pivot.OptionsDataField.Area = PivotDataArea.ColumnArea;
    pivot.OptionsDataField.AreaIndex = 1;
}

web-forms-pivot-grid-split-field-value-cells/CS/ASPxPivotGrid_SplittingCells/Data.cs#L34

csharp
pivot.OptionsDataField.Area = PivotDataArea.ColumnArea;
    pivot.OptionsDataField.AreaIndex = 1;
}

web-forms-pivot-grid-hide-particular-rows-and-columns/CS/ASPxPivotGrid_HidingColumnsAndRows/Data.cs#L36

csharp
pivot.OptionsDataField.Area = PivotDataArea.ColumnArea;
    pivot.OptionsDataField.AreaIndex = 1;
}

winforms-pivot-grid-hide-specific-columns-and-rows/VB/Data.vb#L39

vb
pivot.OptionsDataField.Area = PivotDataArea.ColumnArea
    pivot.OptionsDataField.AreaIndex = 1
End Sub

winforms-pivot-split-field-value-cells/VB/Data.vb#L37

vb
pivot.OptionsDataField.Area = PivotDataArea.ColumnArea
    pivot.OptionsDataField.AreaIndex = 1
End Sub

winforms-pivot-grid-hide-empty-columns-and-rows/VB/Data.vb#L46

vb
pivot.OptionsDataField.Area = PivotDataArea.ColumnArea
    pivot.OptionsDataField.AreaIndex = 1
End Sub

web-forms-pivot-grid-split-field-value-cells/VB/ASPxPivotGrid_SplittingCells/Data.vb#L47

vb
pivot.OptionsDataField.Area = PivotDataArea.ColumnArea
    pivot.OptionsDataField.AreaIndex = 1
End Sub

web-forms-pivot-grid-hide-particular-rows-and-columns/VB/ASPxPivotGrid_HidingColumnsAndRows/Data.vb#L49

vb
pivot.OptionsDataField.Area = PivotDataArea.ColumnArea
    pivot.OptionsDataField.AreaIndex = 1
End Sub

See Also

Area

PivotGridOptionsDataField Class

PivotGridOptionsDataField Members

DevExpress.XtraPivotGrid Namespace