1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16:
público GridView2_DataBound vacío (remitente del objeto, GridViewRowEventArgs e) { si (== DataControlRowType.DataRow de e.Row.RowType) { currentRowDate DateTime = DateTime.Now; // su valor prefijado DateTime.TryParse (e.Row.Cells [0]. Texto, hacia fuera currentRowDate); si (currentRowDate > DateTime.Now.AddMonths (- 3)) { e.Row.Cells [0]. Estilo [“fondo-color”] = “rojo”; } si (currentRowDate > DateTime.Now.AddMonths (- 6)) { e.Row.Cells [0]. Estilo [“fondo-color”] = “amarillo”; } } }