Skip to main content
A newer version of this page is available. .

PivotGridField.HeaderTemplate Property

Gets or sets a template used to display the content of the field’s header.

Namespace: DevExpress.Web.ASPxPivotGrid

Assembly: DevExpress.Web.ASPxPivotGrid.v20.2.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(null)]
public ITemplate HeaderTemplate { get; set; }

Property Value

Type Default Description
ITemplate *null*

An object that supports the System.Web.UI.ITemplate interface and contains the custom content for the field’s header.

Remarks

By creating a template of the HeaderTemplate type, you can define the custom content displayed for the header of the current field. Depending upon a field’s PivotGridFieldBase.Area property setting, its header can be located in the following areas: the column header area, data header area, filter header area, row header area. The appearance of the field header is controlled by the PivotGridStyles.HeaderStyle or PivotGridField.HeaderStyle property.

A template created using the HeaderTemplate property takes precedence over a template of the ASPxPivotGrid.HeaderTemplate type, which defines a common content for all field headers within the ASPxPivotGrid control.

Important

Note that the field’s PivotGridField.ID property must be set to a unique value to use templates.

Note

Once a template defined via the HeaderTemplate property is created within a control, it is instantiated within a container object of the PivotGridHeaderTemplateContainer type. This container object exposes a set of specific properties to which the template’s child controls can be bound.

See Also