DataGridViewCellStyle::ForeColor Property
.NET Framework (current version)
Gets or sets the foreground color of a DataGridView cell.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The ForeColor property typically should specify a color that contrasts with the BackColor property.
The following code example demonstrates how to set the ForeColor and BackColor properties for cells in alternating rows. 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: