System.Web.UI.WebControls.TemplateColumn.HeaderTemplate Property

Gets or sets the template for displaying the heading section of the System.Web.UI.WebControls.TemplateColumn object.

Syntax

[System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.DataGridItem))]
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
[System.ComponentModel.DefaultValue(null)]
[System.ComponentModel.Browsable(false)]
public virtual System.Web.UI.ITemplate HeaderTemplate { set; get; }

Value

a System.Web.UI.ITemplate

Remarks

Use the TemplateColumn.HeaderTemplate property to control the appearance of the heading section in the System.Web.UI.WebControls.TemplateColumn object. The appearance is specified by creating a template that defines how the item is rendered in the column. To specify a template for the item selected for editing, first place opening and closing <HeaderTemplate> tags between the opening and closing tags of the <TemplateColumn> element. You can then list the content that controls the appearance of the item between the opening and closing <HeaderTemplate> tags. The content can be as simple as plain text, or can be made more complex by embedding other controls in the template.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0