I have a DataGridView that has a class as its DataSource.
The class contains an ID string, 2x DateTimes and a Boolean.
I have written some code to change the text of a row that matches an ID I pass to method to Red, but nothing I have tried works.
This is what I have so far:
public void ShowInstanceAsTerminated(String id)
{
foreach (DataGridViewRow dgvRow in dgvRIM.Rows)
{
if (dgvRow.Cells[0].Value.ToString() == id)
{
dgvRow.DefaultCellStyle.ForeColor = Color.Red;
}
}
}
This is one of many variations of code I have tried, but the cells in question never change!!
Thanks Neil