datagrid 单击显示所在行数据事件

    Private Sub DG2_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DG1.MouseUp
        Dim i As Integer
        Dim k As String
        i = DG2.CurrentRowIndex
        Me.id.Text = DG2.Item(i, 0)
        Me.TBmingcheng.Text = DG2.Item(i, 1)
        Me.TBfaren.Text = DG2.Item(i, 2)
        Me.TBdianhua.Text = DG2.Item(i, 3)
        Me.TBchuanzhen.Text = DG2.Item(i, 4)
        Me.TByoubian.Text = DG2.Item(i, 5)
        Me.TBdizhi.Text = DG2.Item(i, 6)
        Me.TBmail.Text = DG2.Item(i, 7)
        Me.TBzhuye.Text = DG2.Item(i, 8)
        If DG2.Item(i, 9).ToString() = "" And DG2.Item(i, 9).ToString() = Nothing Then
            k = "/"
            Me.RTBbeizhu.Text = k
        Else
            Me.RTBbeizhu.Text = DG2.Item(i, 9)
        End If
        DreamsSBar1.Panels(3).Text() = "第" & i + 1 & "行"
阅读更多
个人分类: VB.NET
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭