protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
for (int i = 0; i < GridView1.Rows.Count; i++)
{
DateTime date = Convert.ToDateTime(GridView1.Rows[i].Cells[0].Text);
if (date < DateTime.Now)
{
GridView1.Rows[i].Cells[0].BackColor = System.Drawing.Color.Red;
}
}
}
This is the code. its working for me. change the cell index as u like
Regards
Kunjammu