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

  • 相关阅读:
    P3916 图的遍历 dfs
    P4568 [JLOI2011]飞行路线 分层图最短路
    P1948 [USACO08JAN]电话线Telephone Lines spfa 二分答案
    P1849 [USACO12MAR]拖拉机Tractor bfs
    P1730 最小密度路径 floyed
    P1661 扩散 二分答案 并查集
    使用unittest和Django搭配写一个接口测试平台
    AJAX解决跨域的几种方式
    Django
    基于pytest框架自动化测试脚本的编写
  • 原文地址:https://www.cnblogs.com/zzxap/p/2175962.html
Copyright © 2011-2022 走看看