Gets or sets the background color of alternating rows for a ledger appearance.
[Visual Basic] Overridable Public Property AlternatingBackColor As Color [C#] public Color AlternatingBackColor {virtual get; virtual set;} [C++] public: __property virtual Color get_AlternatingBackColor(); public: __property virtual void set_AlternatingBackColor(Color); [JScript] public function get AlternatingBackColor() : Color; public function set AlternatingBackColor(Color);
A Color that represents the alternating background color. The default is the AlternatingBackColor of the control.
The following example sets the AlternatingBackColor property of a specific DataGridColumn to yellow.
[Visual Basic]
Private Sub AltBack() ' Create a color object. Dim c As System.Drawing.Color c = System.Drawing.color.Yellow ' Declare an object variable for the DataGridColumn. Dim dgc As DataGridColumn Set dgc = DataGrid1.GridColumns(0) ' Set the AlternatingBackColor to the color object. dgc.AlternatingBackColor = c End Sub
DataGridColumn Class | DataGridColumn Members | System.WinForms Namespace | AlternatingBackColor | BackColor