protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { DateTime dt = DateTime.ParseExact(e.Row.Cells[4].Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); if (dt < DateTime.Now) e.Row.Style.Add("background-color", "grey"); } else { Response.Write("nothing"); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)