System.Web.UI.WebControls.DetailsView.HeaderTemplate Property

Gets or sets the user-defined content for the header row in a System.Web.UI.WebControls.DetailsView control.

Syntax

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

Value

Documentation for this section has not yet been entered.

Remarks

The header row is displayed at the top of the System.Web.UI.WebControls.DetailsView control when the DetailsView.HeaderText or DetailsView.HeaderTemplate property is set. You can define your own custom user interface (UI) for the header row by using the DetailsView.HeaderTemplate property. To specify a custom template for the header row, first place <HeaderTemplate> tags between the opening and closing tags of the System.Web.UI.WebControls.DetailsView control. You can then list the contents of the template between the opening and closing <HeaderTemplate> tags. To control the style of the header row, use the DetailsView.HeaderStyle property. Alternatively, you can simply display text in the header row by setting the DetailsView.HeaderText property instead of this property.

Note:

If both the DetailsView.HeaderText and DetailsView.HeaderTemplate properties are set, the DetailsView.HeaderTemplate property takes precedence.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0