Data Cell Layout

  • 2 minutes to read

The data header allows you to customize the location and orientation of data field headers and therefore, the location of data cells as well.

Data Header Overview

By default, when there are two or more data fields, data field headers are displayed to distinguish between different summary values; data cells are located one after another as shown in the image below.

cdDataCellLayout1

The data header allows you to control the location and orientation of data field headers and therefore, the location of data cells. This header is linked with data field headers. The image below shows the data header located within the Row Header Area.

cdDataCellLayout2

Customizing the Data Header

Like any other field header, end-users can customize the layout of data field headers by changing the location of the data header using drag and drop.

For example, end-users can locate the data field headers along the left inner edge...

cdDataCellLayout3

...or the top outer edge of the PivotGridControl.

cdDataCellLayout4

Customizing the Data Header in Code

The PivotGridControl.OptionsDataField property provides options that control the content, size and availability of the data header. These options are listed and described briefly in the table below.

Property

Description

PivotGridOptionsDataField.Area

Determines the area in which the data field headers are displayed when there are two or more data fields.

Setting this property to PivotDataArea.ColumnArea or PivotDataArea.RowArea enables the Data Header. 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 the associated location.

PivotGridOptionsDataField.AreaIndex

Specifies the position of the data field headers within the hierarchy of field values.

PivotGridOptionsDataField.Caption

Specifies the text displayed within the Data Header.

PivotGridOptionsDataField.RowHeaderWidth

Specifies the width of the data field headers when they are displayed as row headers.

PivotGridOptionsDataField.RowValueLineCount

Specifies the height of data field headers in text lines. This property is in effect when there are two or more data fields, and data field headers are displayed in the Row Header Area.

PivotGridOptionsDataField.ColumnValueLineCount

Specifies the height of data field headers, in text lines. This property is in effect when there are two or more data fields, and data field headers are displayed in the Column Header Area.