I want to change all the colours of text in rows in a column depending on the column name in C#. How would I accomplish this?
So far I've tried the following:
private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) { if (this.dataGridView1.Columns[e.ColumnIndex].Name == "DatePaid") { e.CellStyle.ForeColor = Color.Blue; } } The program builds - but it doesn't work at all