aspnet-devexpress-dot-web-dot-aspxpivotgrid-dot-aspxpivotgrid-68f677f0.md
Gets or sets a template to display the content of cells.
Namespace : DevExpress.Web.ASPxPivotGrid
Assembly : DevExpress.Web.ASPxPivotGrid.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue(null)]
public virtual ITemplate CellTemplate { get; set; }
<DefaultValue(Nothing)>
Public Overridable Property CellTemplate As ITemplate
| Type | Default | Description |
|---|---|---|
| ITemplate | null |
An object supporting the System.Web.UI.ITemplate interface that contains the custom content for cells.
|
By creating a template of the CellTemplate type, you can define the custom content displayed for cells in the ASPxPivotGrid control. The cell appearance can be controlled by the PivotGridStyles.CellStyle or PivotGridField.CellStyle property.
Note
Once a template defined via the CellTemplate property is created within a control, it is instantiated within a container object of the PivotGridCellTemplateContainer type. This container object exposes a set of specific properties to which the template’s child controls can be bound.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CellTemplate property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
protected void Page_Load(object sender, EventArgs e) {
ASPxPivotGrid1.CellTemplate = new CellTemplate();
}
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
ASPxPivotGrid1.CellTemplate = New CellTemplate()
End Sub
See Also