title: C# DataGridView Color text of single row
body: <p>I have a DataGridView that has a class as its DataSource.</p>
  
  <p>The class contains an ID string, 2x DateTimes and a Boolean.</p>
  
  <p>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.</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>public void ShowInstanceAsTerminated(String id)
  {
      foreach (DataGridViewRow dgvRow in dgvRIM.Rows)
      {
          if (dgvRow.Cells[0].Value.ToString() == id)
          {
              dgvRow.DefaultCellStyle.ForeColor = Color.Red;
          }
      }
  }
  </code></pre>
  
  <p>This is one of many variations of code I have tried, but the cells in question never change!!</p>
  
  <p>Thanks
  Neil</p>