Skip to main content

Data Field

  • 2 minutes to read

Data fields represent fields located in a Pivot Grid Control’s data header area. PivotGridControl calculates summaries against data fields and summary results displayed within the Data Area.

For numeric data fields, the following summary functions can be calculated: Sum, Count, Min, Max, Average, Standard Deviation based on a sample, Standard Deviation based on the entire population, Variation based on a sample and Variation based on the entire population.

For non-numeric data fields, the following summary functions are available: Count, Min and Max.

 

The following image shows a sample PivotGrid control that contains one data field - “Quantity(Sum)”:

veDataField

When there are two or more data fields, PivotGrid displays data field headers to distinguish between different summary values.

veDataField_2

By default, data field headers are listed along a control’s top edge. It is possible to display the data field headers along the control’s left edge by setting the PivotGridOptionsDataField.Area property to PivotDataArea.RowArea. The PivotGridOptionsDataField.AreaIndex property specifies the position of the data field headers within the hierarchy of field values.

Setting the PivotGridOptionsDataField.Area property to PivotDataArea.ColumnArea or PivotDataArea.RowArea enables the data header. This is a header that is linked with data field headers. It can be dragged to a specific position within a column header area or row header area and as a result, data field headers will be moved to the associated location.

veDataField2_DataHeader

 

The table below lists the main properties that affect the field’s functionality.

Field Name

PivotGridFieldBase.FieldName

Bound Type

PivotGridFieldBase.UnboundType

Summary Type

PivotGridFieldBase.SummaryType

PivotGridFieldOptions.AllowRunTimeSummaryChange

Position

PivotGridFieldBase.Area, PivotGridFieldBase.AreaIndex

For data fields, the PivotGridFieldBase.Area property is set to PivotArea.DataArea.

Position of Data Field Headers

PivotGridOptionsDataField.Area, PivotGridOptionsDataField.AreaIndex

Size of Data Field Headers

PivotGridOptionsDataField.ColumnValueLineCount

PivotGridOptionsDataField.RowValueLineCount

PivotGridOptionsDataField.RowHeaderWidth

Column Width

PivotGridFieldBase.Width

PivotGridFieldBase.MinWidth

The PivotGridControl.FieldWidthChanged event provides a notification that the field width has been changed.

Caption of the Data Header

PivotGridOptionsDataField.Caption

Visibility

PivotGridFieldBase.Visible

Linking with Other Fields

PivotGridControl.Groups

See Also