GridView移动显示颜色
if (e.Row.RowType == DataControlRowType.DataRow)
        {
            //当鼠标停留时更改背景色
            e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#EBFBBA'");
            //当鼠标移开时还原背景色
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c");
……………………
}
Any fool can write code that a computer can understand. Good programmers write code that humans can understand. –Martin Fowler
作者:『Gerry Ge』
        
        本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文链接,否则保留追究法律责任的权利。
    
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号