您的位置:首页 > 移动开发 > Objective-C

GridView控件RowCreated事件的操作——鼠标动作

2010-05-09 13:20 501 查看
说明:这里所谓的鼠标动作指的是,当鼠标经过某一行的时候,该行的颜色发生变化。

 

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='#00fee';");

e.Row.Attributes.Add("onmouseout","this.style.backgroundColor=c;");

}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  object c