gridview鼠标经过行换色代码
选中gridview再选择事件
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#FF0000';");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c;");
}
浙公网安备 33010602011771号