Back to Devexpress

PivotGridOptionsDataField.Area Property

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

latest9.0 KB
Original Source

PivotGridOptionsDataField.Area Property

Gets or sets the area in which the data field headers are displayed.

Namespace : DevExpress.XtraPivotGrid

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

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

Declaration

csharp
[DefaultValue(PivotDataArea.None)]
public PivotDataArea Area { get; set; }
vb
<DefaultValue(PivotDataArea.None)>
Public Property Area As PivotDataArea

Property Value

TypeDefaultDescription
PivotDataAreaNone

A PivotDataArea value that specifies the area in which the data field headers are displayed.

|

Available values:

NameDescription
None

The data field headers are displayed as column headers. The data header is hidden.

| | ColumnArea |

The data field headers are displayed as column headers. The data header is displayed within the column header area.

| | RowArea |

The data field headers are displayed as row headers. The data header is displayed within the row header area.

|

Property Paths

You can access this nested property as listed below:

LibraryObject TypePath to Area
WinForms ControlsPivotGridControl

.OptionsDataField .Area

| | .NET Reporting Tools | XRPivotGrid |

.OptionsDataField .Area

|

Remarks

The Area property determines the area in which the data field headers are displayed when there are two or more data fields. This property also enables the data header which allows end-users to move data field headers between and within the column header area and row header area.

By default, the data field headers are displayed as column headers:

If the Area property is set to PivotDataArea.ColumnArea the data field headers are still displayed as column headers. In addition, the data header is enabled and displayed within the column header area. The data header is a header which is linked with the data field headers. It can be dragged to a specific position within the column header area or row header area and as a result the data field headers will be moved to an appropriate location.

If the Area property is set to PivotDataArea.RowArea the data header will be moved to the row header area and the data field headers will be displayed as row headers:

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

csharp
pivot.OptionsView.ColumnTotalsLocation = PivotTotalsLocation.Far;
pivot.OptionsDataField.Area = PivotDataArea.ColumnArea;
pivot.OptionsDataField.AreaIndex = 1;

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

csharp
pivot.OptionsView.ColumnTotalsLocation = PivotTotalsLocation.Far;
pivot.OptionsDataField.Area = PivotDataArea.ColumnArea;
pivot.OptionsDataField.AreaIndex = 1;

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

csharp
pivot.OptionsView.ColumnTotalsLocation = PivotTotalsLocation.Far;
pivot.OptionsDataField.Area = PivotDataArea.ColumnArea;
pivot.OptionsDataField.AreaIndex = 1;

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

csharp
pivot.OptionsView.ColumnTotalsLocation = PivotTotalsLocation.Far;
pivot.OptionsDataField.Area = PivotDataArea.ColumnArea;
pivot.OptionsDataField.AreaIndex = 1;

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

csharp
pivot.OptionsView.ColumnTotalsLocation = PivotTotalsLocation.Far;
pivot.OptionsDataField.Area = PivotDataArea.ColumnArea;
pivot.OptionsDataField.AreaIndex = 1;

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

vb
pivot.OptionsView.ColumnTotalsLocation = PivotTotalsLocation.Far
pivot.OptionsDataField.Area = PivotDataArea.ColumnArea
pivot.OptionsDataField.AreaIndex = 1

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

vb
pivot.OptionsView.ColumnTotalsLocation = PivotTotalsLocation.Far
pivot.OptionsDataField.Area = PivotDataArea.ColumnArea
pivot.OptionsDataField.AreaIndex = 1

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

vb
pivot.OptionsView.ColumnTotalsLocation = PivotTotalsLocation.Far
pivot.OptionsDataField.Area = PivotDataArea.ColumnArea
pivot.OptionsDataField.AreaIndex = 1

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

vb
pivot.OptionsView.ColumnTotalsLocation = PivotTotalsLocation.Far
pivot.OptionsDataField.Area = PivotDataArea.ColumnArea
pivot.OptionsDataField.AreaIndex = 1

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

vb
pivot.OptionsView.ColumnTotalsLocation = PivotTotalsLocation.Far
pivot.OptionsDataField.Area = PivotDataArea.ColumnArea
pivot.OptionsDataField.AreaIndex = 1

See Also

AreaIndex

RowHeaderWidth

PivotGridOptionsDataField Class

PivotGridOptionsDataField Members

DevExpress.XtraPivotGrid Namespace