TemplateColumn::HeaderTemplate Property
Gets or sets the template for displaying the heading section of the TemplateColumn object.
Assembly: System.Web (in System.Web.dll)
public: [BrowsableAttribute(false)] [PersistenceModeAttribute(PersistenceMode::InnerProperty)] [TemplateContainerAttribute((DataGridItem^::typeid))] property ITemplate^ HeaderTemplate { virtual ITemplate^ get(); virtual void set(ITemplate^ value); }
Property Value
Type: System.Web.UI::ITemplate^A System.Web.UI::ITemplate-implemented object that contains the template for displaying the heading section of the TemplateColumn. The default value is null, which indicates that this property is not set.
Use the HeaderTemplate property to control the appearance of the heading section in the 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.
The following code example demonstrates how to use the HeaderTemplate property to control the appearance of the heading section in the TemplateColumn object.
Available since 1.1