NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataGrid.HeaderBackColor

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);

Property Value

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

Exceptions

Exception Type Condition
ArgumentNullException While trying to set the property, a Color.Empty was passed.

Example [Visual Basic]

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

See Also

DataGrid Class | DataGrid Members | System.WinForms Namespace | HeaderForeColor | FlatMode