Back to Devexpress

PivotGridField.HeaderTemplate Property

aspnet-devexpress-dot-web-dot-aspxpivotgrid-dot-pivotgridfield-706f4ef0.md

latest3.1 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue(null)]
public ITemplate HeaderTemplate { get; set; }
vb
<DefaultValue(Nothing)>
Public Property HeaderTemplate As ITemplate

Property Value

TypeDefaultDescription
ITemplatenull

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

HeaderTemplate

PivotGridField Class

PivotGridField Members

DevExpress.Web.ASPxPivotGrid Namespace