DataControlField::HeaderStyle Property
.NET Framework (current version)
Gets or sets the style of the header of the data control field.
Assembly: System.Web (in System.Web.dll)
public: [PersistenceModeAttribute(PersistenceMode::InnerProperty)] property TableItemStyle^ HeaderStyle { TableItemStyle^ get(); }
Property Value
Type: System.Web.UI.WebControls::TableItemStyle^A TableItemStyle that governs the appearance of the DataControlField header item.
The HeaderStyle property governs the appearance of any text displayed in the header item of a type derived from DataControlField. The most common application of the HeaderStyle property is to alter the style of the column headers in a GridView control.
The following code example demonstrates how to declaratively set the HeaderStyle property of a HyperLinkField column, which displays a yellow background color for the column header in the GridView control.
.NET Framework
Available since 2.0
Available since 2.0
Show: