You need to add this code.
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
e.Row.Attributes.Add("onclick", "this.style.backgroundColor='Silver'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='White'");
}
If its a Datagrid I think the event should be on ItemDataBound and e.Row should be e.Item.My example is for a GridView control in .net 2.0
Hope this helps.
Aldwin Enriquez
"Dont you ever give up!"
|