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!

DataGridColumn.BackColor

Gets or sets the background color of the column.

[Visual Basic]
Overridable Public Property BackColor As Color
[C#]
public Color BackColor {virtual get; virtual set;}
[C++]
public: __property virtual Color get_BackColor();
public: __property virtual void set_BackColor(Color);
[JScript]
public function get BackColor() : Color;
public function set BackColor(Color);

Property Value

A Color that represents the background color of the column. The default is the background color of the DataGrid control.

Example [Visual Basic]

The following example sets the AlternatingBackColor for each TBD in a GridColumnsCollection to yellow.

[Visual Basic]

Private Sub SetAltBack()
   Dim c As System.Drawing.Color
   c = System.Drawing.Color.Yellow
    
   Dim dgCols as GridColumnsCollection  
   Dim dgc As DataGridColumn
   Set dgCols = DataGrid1.GridColumns
   
   For Each dgc in dgCols
      dgc.AlternatingBackColor = c
   Next
End Sub

See Also

DataGridColumn Class | DataGridColumn Members | System.WinForms Namespace | AlternatingBackColor | ForeColor | GetBackColor