DataControlField.HeaderStyle Property

 

Gets or sets the style of the header of the data control field.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

[<PersistenceModeAttribute(PersistenceMode.InnerProperty)>]
member HeaderStyle : TableItemStyle with 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.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: