Gridview光棒效果

代码
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add(
"onmouseover","currentcolor=this.style.backgroundColor; this.style.backgroundColor='red'");
e.Row.Attributes.Add(
"onmouseout","this.style.backgroundColor=currentcolor");
}
}

 

posted @ 2010-08-20 08:47  疯狂的民工  阅读(100)  评论(0编辑  收藏  举报