鼠标滑过 gridview 背景色发生改变
gridview 绑定了10列数据,现在想实现鼠标滑过每一行的数据时,第1到9列的背景色发生变化,查了相关的资料只能做到要变所有的列都发生了变化,相关代码如下:
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", " currentcolor =this.style.backgroundColor;this.style.backgroundColor='#cccc00';this.style.cursor='default';");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor;this.style.cursor='default';");
}
我要在这里哪些代码才能控制发生变化的列啊?
在线等啊