I'm trying to set a color for the DefaulyCellStyle property but in only color the first cell for some reason. Any ideas?
DataGridViewCellStyle.ForeColor Property
C#:
// Set the selection background color for all the cells.
dataGridView1.DefaultCellStyle.SelectionBackColor = Color.White;
dataGridView1.DefaultCellStyle.SelectionForeColor = Color.Black;
Last edited: