Gets or sets the background color of all row and column headers.
[Visual Basic] Public Property HeaderBackColor As Color [C#] public Color HeaderBackColor {get; set;} [C++] public: __property Color get_HeaderBackColor(); public: __property void set_HeaderBackColor(Color); [JScript] public function get HeaderBackColor() : Color; public function set HeaderBackColor(Color);
A Color that represents the background color of row and column headers. The default is the system color for controls (SystemColors.Control).
Exception Type | Condition |
---|---|
ArgumentNullException | While trying to set the property, a Color.Empty was passed. |
The following example sets the background color of column headers using a value passed to the method.
[Visual Basic]
Private Sub SetHeaderBackClr(Byval myGrid As DataGrid) Set myGrid.HeaderBackColor = System.Drawing.Color.CadetBlue End Sub
DataGrid Class | DataGrid Members | System.WinForms Namespace | HeaderForeColor | FlatMode