DataGridViewCellStyle::BackColor Property
.NET Framework (current version)
Gets or sets the background color of a DataGridView cell.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The following code example sets the background color of cells in the DataGridView by setting the BackColor property on the DefaultCellStyle property. Note that the background color is overridden on alternating rows because the BackColor property is set on the AlternatingRowsDefaultCellStyle property. This code example is part of a larger example provided for the DataGridViewCellStyle class.
.NET Framework
Available since 2.0
Available since 2.0
Show: