在gridview绑定事件中写以下代码
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "this.style.cursor='hand';color1=this.style.backgroundColor;this.style.backgroundColor='#ffffcc'");//鼠标放上去背景颜色是'#ffffcc'淡黄色
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=color1;this.style.cursor='default';");//鼠标移开背景色还是原来的颜色
}