Subscriber portal
Gets or sets the background color of odd-numbered rows of the grid.
public: property Color AlternatingBackColor { Color get(); void set(Color value); }
A Color that represents the alternating background color. The default is the system color for windows (Window).
By default, both the BackColor and the AlternatingBackColor properties are set to the same color. Setting the BackColor property affects only even-numbered rows, while setting the AlternatingBackColor affects only odd-numbered rows.
The following code example sets the AlternatingBackColor to a Color value.
Private Sub ChangeAltBackClr(ByVal myGrid As DataGrid, _ ByVal myColor As Color) myGrid.AlternatingBackColor = myColor End Sub
DataGrid ClassSystem.Windows.Forms Namespace