zoukankan      html  css  js  c++  java
  • 后台给GridView添加行的样式

     protected void gvMoreSize_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {

    for (int j = 0; j < this.gvMoreSize.Rows.Count + 1; j++)
                {
                    //首先判断是否是数据行
                    if (e.Row.RowType == DataControlRowType.DataRow)
                    {
                        //当鼠标停留时更改背景色
                        e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.color='#116a79';this.style.backgroundColor='#cef97b'");
                        //当鼠标移开时还原背景色
                        e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c;this.style.color='#3a6381'");
                        e.Row.Attributes["style"] = "Cursor:pointer";
                    }
                }

    }

  • 相关阅读:
    js的同步和异步
    事件三
    事件2
    JS作用域题
    游戏之乐
    NSTimer(2)
    NSTimer
    理解 Objective-C Runtime
    iOS系统安全机制概览
    Which is the best of GCD, NSThread or NSOperationQueue?
  • 原文地址:https://www.cnblogs.com/12go/p/2171630.html
Copyright © 2011-2022 走看看