在DataGrid的ItemDataBound事件里面写
if ( e.Item.ItemType != ListItemType.Header )
{ e.Item.Attributes.Add( "onmouseout","this.style.backgroundColor=\""+e.Item.Style["BACKGROUND-COLOR"]+"\"" );
e.Item.Attributes.Add( "onmouseover","this.style.backgroundColor=\""+ "#B9D9FB"+\"" );
}
if ( e.Item.ItemType != ListItemType.Header )
{ e.Item.Attributes.Add( "onmouseout","this.style.backgroundColor=\""+e.Item.Style["BACKGROUND-COLOR"]+"\"" );
e.Item.Attributes.Add( "onmouseover","this.style.backgroundColor=\""+ "#B9D9FB"+\"" );
}
解决方案 »
- 关于投票
- 投票时同一IP不能重复投票,这里怎么验证是同一IP
- 帮忙解释一下``急``
- DataGrid模板列中DropDownList的SelectChanged事件问题?搞了一上午,只能麻烦大家了?在线等。。
- 请教:怎么判断email是否成功发送出去?100分,在线等待!
- 安装Windows Sharepoint Service后,不能用vs.net创建Web Application?
- 公司在电信放了台主机.现在还是归我管理.想暂时做下演示的朋友可联系我.
- 窗口验证深一层问题。
- 发送email的问题,照着书上的也错,无语ing!
- 请教论坛里面表情的实现方法和思路
- 问一个javascript客户端验证的问题
- 今天来突然之间出现了这样的问题,请问原因?因为上个星期还是好用的!!!
e.Item.Attributes.Add("onmouseover","javascript:.....")