Im trying to change the color of a row when the value of one of my columns is changed to Terminated
.
for example when an employee is termiated i want the color of his record to be red.
this is the code i have so far.
foreach (DataRow dr in dt.Rows)
{
if (dr[9].ToString() == "Terminated")
{
dataGridView5.BackgroundColor = Color.Blue;
}
}