Gridview 中 如何实现 鼠标感应啊?
就是象普通表格那样,当鼠标划过时,对应行背景色会变化!
如何实现啊?
------解决方案--------------------protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add( "onmouseover ", "this.style.backgroundColor= '#E6F5FA ' ");
e.Row.Attributes.Add( "onmouseout ", "this.style.backgroundColor= '#FFFFFF ' ");
}
}