【发布时间】:2011-02-17 01:30:24
【问题描述】:
下面是可以正常工作的代码,但我唯一的问题是:用backgroundColor='white' 覆盖替代行onmouseout 时我怎么能有我的替代颜色?
<AlternatingRowStyle BackColor="#DEEEE9" Font-Size="8pt" />
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#C2D69B'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='white'");
e.Row.Attributes.Add("style", "cursor:pointer;");
}
【问题讨论】: