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);
A Color that represents the background color of the column. The default is the background color of the DataGrid control.
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
DataGridColumn Class | DataGridColumn Members | System.WinForms Namespace | AlternatingBackColor | ForeColor | GetBackColor