zoukankan      html  css  js  c++  java
  • 点击gridview弹出网页修改当前行

    'Protected Sub GridView1_RowDataBound1(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles GridView1.RowDataBound
        '    If e.Row.RowType = DataControlRowType.DataRow Then
        '        'e.Row.Attributes.Add("onclick ", "if(document.oldTr !=null){document.oldTr.runtimeStyle.cssText= ' ';}this.runtimeStyle.cssText= 'background-color:red ';document.oldTr=this;window.showModelessDialog( 'bb.aspx?id= " + e.Row.Cells(0).Text + " '); ")
        '        ' e.Row.Attributes.Add("onclick ", "if(document.oldTr !=null){document.oldTr.runtimeStyle.cssText= ' ';}this.runtimeStyle.cssText= 'background-color:blue ';document.oldTr=this; ")
        '        ' ViewState("PageIndex") = e.Row.Cells(0).Text
        '        ' Response.Write(ViewState("PageIndex"))
        '        e.Row.Attributes.Add("onclick", e.Row.ClientID.ToString() + ".checked=true;selectx(this)")
        '    End If

        'End Sub
        'Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles GridView1.RowDataBound
        '    If e.Row.RowType = DataControlRowType.DataRow Then
        '        'e.Row.Attributes.Add("onmouseover", "if(this!=prevselitem){this.style.backgroundColor=e.Row.style.backgroundColor}")
        '        '当鼠标停留时更改背景色
        '        'e.Row.Attributes.Add("onmouseout", "if(this!=prevselitem){this.style.backgroundColor=e.Row.style.backgroundColor}")
        '        '当鼠标移开时还原背景色
        '        'e.Row.Attributes.Add("onclick", e.Row.ClientID.ToString() + ".checked=true;selectx(this);window.showModelessDialog( 'course.aspx?id= " + e.Row.Cells(0).Text + " ');")
        '        e.Row.Attributes.Add("onclick", e.Row.ClientID.ToString() + ".checked=true;selectx(this);")
        '    End If
        'End Sub

        'Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles GridView1.RowDataBound
        '    ' e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#95B8FF'")
        '    'e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c")
        '    e.Row.Attributes("style") = "Cursor:hand"
        '    Dim count As Integer = GridView1.Rows.Count
        '    Dim ID As String = ""
        '    For i As Integer = 0 To count - 1
        '        Session("course") = GridView1.DataKeys(i).Value.ToString()
        '        'Session("course") = e.Row.Cells(i).Text
        '        'GridView1.Rows(i).Attributes.Add("onclick", "newwin=window.open('addclass.aspx?ID=" + ID + "','newwin','width=500,height=550')")
        '        Response.Write(Session("course"))
        '    Next
        'End Sub

  • 相关阅读:
    python模块之StringIO/cStringIO(内存文件)
    python3之json模块使用
    使用chardet判断编码方式
    HBase笔记之远程Shell界面命令行无法删除字符的解决方案
    Linux命令之uptime
    Redis笔记之常用命令
    Spring Boot笔记之自定义启动banner
    Windows Live Writer博客草稿迁移的一种解决方案
    ActiveMQ笔记之安装(Linux)
    Impala笔记之通用命令
  • 原文地址:https://www.cnblogs.com/zzxap/p/2175962.html
Copyright © 2011-2022 走看看