📜  vb.net 通过单击单元格获取名称 - VBA 代码示例

📅  最后修改于: 2022-03-11 14:51:56.413000             🧑  作者: Mango

代码示例1
Private Sub GetSelectionChangedValue(e As DataGridViewCellEventArgs)
        Dim selectedRow As DataGridViewRow
        Dim index As Integer
        index = e.RowIndex
        selectedRow = dgvtest.Rows(index)
        lblCellCange.Text = selectedRow.Cells(2).Value.ToString

    End Sub

    Private Sub dgvtest_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvtest.CellClick
        GetSelectionChangedValue(e)
    End Sub