日期:2014-05-16  浏览次数:20508 次

如何通过JS控制AspxGridview中某几行的颜色???
要实现的功能如下:
AspxGridview有一列为“id”,要求让id为某几个数的行背景色显示为某种颜色。后台实现我可以实现,可是如何通过前台JS代码来实现呢???????

注意,这里是AspxGridview不是Gridview!!!!
------解决方案--------------------
鼠标点击时一行变色的程序是这样的,可参照之:
通过ASPxGridView1_HtmlRowPrepared响应函数
e.Row.Attributes.Add("onmouseover", "temp=this.style.backgroundColor;this.style.backgroundColor='lemonchiffon'");//#fae7e9
                e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=temp");