En este ejemplo he usado color de resaltado verde y el grid es sencillo utilice la BD Northwind agregue un SQLDataSource que contiene un select a una tabla y despues lo llame en Origen de Datos desde el GridView.
en el evento DataBound del GridView agregamos este codigo:
foreach (GridViewRow grow in GridView1.Rows)
{
grow.Attributes["onmouseover"] = "highlight(this, true);";
grow.Attributes["onmouseout"] = "highlight(this, false);";
HttpResponse myHttpResponse = Response;
HtmlTextWriter myHtmlTextWriter = new HtmlTextWriter(myHttpResponse.Output);
grow.Attributes.AddAttributes(myHtmlTextWriter);
}espero les haya servido el codigo =)


no funciona amigo, mencionabas codigo javascript pero en tu ejemplo no agregas ninguno.
ResponderEliminarsaludos.