title: Datagrid view in C# and asp.net
body: <p>I am creating a website which contains data from oracle database , I got connection and data populate through grid view , the data is PO number , and orderdate I want to check if orderdate
  
  <pre><code>protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
  {
      if (e.Row.RowType == DataControlRowType.DataRow)
      {
          var now = DateTime.Now;
          var orderdate = DateTime.Parse(e.Row.Cells[0].Value.ToString());
  
          foreach (TableCell cell in e.Row.Cells)
          {
              if (orderdate &lt; now)
              {
                  cell.BackColor = Color.Red;
              }
          }
      }
  }
  </code></pre>