DataGrid::BackColor Property
.NET Framework (current version)
Gets or sets the background color of even-numbered rows of the grid.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Whereas the BackColor property determines the color of rows in the grid, the BackgroundColor determines the color of the nonrow area, which is only visible when the grid is scrolled to the bottom, or if only a few rows are contained in the grid.
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 both the BackColor and BackgroundColor properties to different values.
.NET Framework
Available since 1.1
Available since 1.1
Show: