title: Datagridview cell color change doesnt work
body: <p>I Have a Datagridview bound to a datatable wich hold data from a database</p>
  
  <p>I made a function that checked if a date is within a correct time range</p>
  
  <p>if its correct nothing happens.</p>
  
  <p>else it has to change the color of the row/cell to red</p>
  
  <p>I tried a lot of things but nothing works </p>
  
  <p>Here is the method i created:</p>
  
  <p><pre><code>
          private void CheckFactTermijn()
          {
              for (int i = 0; i &lt; dataGridView1.Rows.Count; i++)
              {
                  DateTime FactuurDatum = Convert.ToDateTime(dataGridView1.Rows[i].Cells[2].Value.ToString());
                  int termijn = Convert.ToInt32(dataGridView1.Rows[i].Cells[7].Value.ToString());
                  DateTime finalDate = FactuurDatum.AddDays((double)termijn);</p>
  
              if (finalDate &gt; DateTime.Now)
              {
              }
              else
              {
                      dataGridView1.Rows[i].DefaultCellStyle.BackColor = Color.Red;
              }
          }
      }
  </code></pre>