zoukankan      html  css  js  c++  java
  • DataGrid双击行事件

     <asp:datagrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP: 40px" runat="server"
         BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" BackColor="#DEBA84" CellPadding="0"
         Width="272px">
         <SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#738A9C"></SelectedItemStyle>
         <ItemStyle ForeColor="#8C4510" BackColor="#FFF7E7"></ItemStyle>
         <HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#A55129"></HeaderStyle>
         <FooterStyle ForeColor="#8C4510" BackColor="#F7DFB5"></FooterStyle>
         <PagerStyle HorizontalAlign="Center" ForeColor="#8C4510" Mode="NumericPages"></PagerStyle>
        </asp:datagrid>
        <DIV style="DISPLAY: inline; Z-INDEX: 104; LEFT: 168px; WIDTH: 24px; POSITION: absolute; TOP: 360px; HEIGHT: 16px"
         ms_positioning="FlowLayout">ÐÐ</DIV>
        <INPUT id="Hidden1" style="Z-INDEX: 102; LEFT: 8px; POSITION: absolute; TOP: 8px" type="hidden"
         name="Hidden1" runat="server"></FONT>
       <asp:TextBox id="TextBox1" style="Z-INDEX: 103; LEFT: 128px; POSITION: absolute; TOP: 360px"
        runat="server" Width="32px"></asp:TextBox>
       <asp:Label id="Label1" style="Z-INDEX: 105; LEFT: 40px; POSITION: absolute; TOP: 360px" runat="server">ÄúË«»÷Á˵Ú</asp:Label>

       Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            If Not IsPostBack Then
                Dim d As New Data
                DataGrid1.DataSource = d.getTable
                DataGrid1.DataBind()

            End If
            If Not Request.Form("hidden1") Is Nothing Then
                TextBox1.Text = Request.Form("hidden1").ToString
            End If
        End Sub

        Private Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles DataGrid1.ItemDataBound
            If e.Item.ItemType <> ListItemType.Header And e.Item.ItemType <> ListItemType.Footer Then
                'Response.Write(Color.Beige.ToString())
                'e.Item.Attributes("id") = e.Item.ItemType.ToString() e.Item.ItemIndex.ToString()
                e.Item.Attributes.Add("OnMouseOut", "this.style.backgroundColor='#FFF7E7';this.style.color='#8C4510'")
                e.Item.Attributes.Add("OnMouseOver", "this.style.backgroundColor='#A55129';this.style.color='white';this.style.cursor='hand';")
                e.Item.Attributes.Add("Ondblclick", "javascript:setv(" e.Item.Cells(0).Text ")")
            End If
        End Sub
    End Class

  • 相关阅读:
    利用gcc的__attribute__编译属性section子项构建初始化函数表
    Linux调试
    使用C++ stringstream来进行数据类型转换
    UseConcMarkSweepGC
    Django 3.1 发布,异步支持增强
    网易云音乐的消息队列改造之路
    二维码预生成:码上营销的并发之痛
    源码 redis 分布式锁
    跨度实际上是用来计算排位(rank) 目标节点在跳跃表中的排位 有序集 排序计算
    为什么有序集合需要同时使用跳跃表和字典来实现?
  • 原文地址:https://www.cnblogs.com/goody9807/p/119146.html
Copyright © 2011-2022 走看看