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;");
}
}
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;");
}
}
相关文章推荐
- GridView RowCommand事件操作Demo Code
- 关于ASPxGridView控件触发服务器端FocusedRowChanged事件的设置
- net4:GridView中的重要操作(添加checkbox,以及鼠标动作,行颜色等)
- GridView的RowCreated与RowDataBound事件区别
- VS2005 gridview 控件 row 鼠标悬停变色
- 菜鸟学Asp.Net——GridView控件之RowDataBind事件中如何获取已绑定的数据
- 为GridView控件的数据行添加鼠标动作
- GridView的技巧 绑定行事件,取得单元格值,或取得单元格控件方法,鼠标经过样式
- 为GridView控件的数据行添加鼠标动作
- GridViewRow、DataGrid、Repeater中操作其内控件的方法
- gridview-----添加OnRowDeleting事件及确认事件OnRowCreated
- 在Event内部监测鼠标事件,对窗体内控件调用move动作,UI不刷新
- GridView的RowCreated与RowDataBound事件区别
- Gridview Row事件响应方法无法获取其它UpdatePanel中控件数据的解决办法
- 关于Anthem中的GridView事件RowCreated和RowDatabound
- GridView的RowCreated与RowDataBound事件区别
- 控件响应鼠标操作事件中,判断IsIdle()作用
- GridView控件(六)—数据行响应鼠标的单击和双击事件
- GridView RowCommand事件操作Demo Code
- GridView的RowCreated与RowDataBound事件