protected void GVUsers_RowDataBound(object sender, GridViewRowEventArgs e) { foreach (GridViewRow item in GVLoginHistory.Rows) { item.Cells[0].BackColor = Color.FromName("#54e4b8"); } if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes.Add("onmouseover", "this.originalcolor=this.style.backgroundColor;" + " this.style.backgroundColor='#FDCB0A';"); e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=this.originalcolor;"); } }
if (e.Row.RowType == DataControlRowType.DataRow){ e.Row.Cells[0].BackColor = Color.FromName("#FDCB0A"); // then your other code to apply back color to the row.}
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)