DataGrid.HeaderBackColor Property

Definition

Gets or sets the background color of all row and column headers.

public:
 property System::Drawing::Color HeaderBackColor { System::Drawing::Color get(); void set(System::Drawing::Color value); };
public System.Drawing.Color HeaderBackColor { get; set; }
member this.HeaderBackColor : System.Drawing.Color with get, set
Public Property HeaderBackColor As Color

Property Value

A Color that represents the background color of row and column headers. The default is the system color for controls, Control.

Exceptions

While trying to set the property, a Color.Empty was passed.

Examples

The following code example sets the background color of column headers using a value passed to the method.


Private Sub SetHeaderBackClr(Byval myGrid As DataGrid)
   myGrid.HeaderBackColor = System.Drawing.Color.CadetBlue
End Sub
   

Applies to

See also