Following code will:
Highlight Gridview which is not using alternate row color.
protectedvoid OnRowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
//On Mouse Over Highlight Row
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#ffff00'");
//On Mouse out restore default row color
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'");
}
}
No comments:
Post a Comment