gridview鼠标经过改变行背景色问题?
我上网少了很多相关的代码都不行,我用以下这种方法试过很多次都不成功,
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='ivory'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='white'");
}
}