PivotGridField.ValueTemplate Property

Gets or sets a template to display the content of the field’s value cells.

Namespace: DevExpress.Web.ASPxPivotGrid

Assembly: DevExpress.Web.ASPxPivotGrid.v21.1.dll

Declaration

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

Property Value

Type Default Description
ITemplate

null

An object supporting the System.Web.UI.ITemplate interface that contains the custom content for the field’s values.

Remarks

By creating a template of the ValueTemplate type, you can define the custom content displayed for value cells of the current field object. The appearance of the field’s value cells is controlled by the PivotGridStyles.FieldValueStyle or PivotGridField.ValueStyle property.

A template created using the ValueTemplate property takes precedence over a template of the ASPxPivotGrid.FieldValueTemplate type, which defines the common content for all field value cells 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 ValueTemplate property is created within a tab control, it is instantiated within a container object of the PivotGridFieldValueTemplateContainer type. This container object exposes a set of specific properties to which the template’s child controls can be bound.

See Also