protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onMouseOver", "this.style.backgroundColor='#ffff00'");//移到列上出現黃色的底色
e.Row.Attributes.Add("onMouseOut", "this.style.backgroundColor='#ffffff'");//確開列,回到白色底色
}
}
全站熱搜