【发布时间】:2015-03-16 21:26:37
【问题描述】:
当我单击相应的单元格时,我正在尝试将使用 Dev Express 设置的数据网格中的值加载到文本框中。
我可以使用 VS 2013 附带的普通 DataGrid 来做到这一点:
Private Sub DataGridView1_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
If e.RowIndex >= 0 Then
Dim row As DataGridViewRow
row = Me.DataGridView1.Rows(e.RowIndex)
tbID.Text = row.Cells("id").Value.ToString
tbFirstName.Text = row.Cells("firstname").Value.ToString
tbLastName.Text = row.Cells("lastname").Value.ToString
tbAddress.Text = row.Cells("address").Value.ToString
End If
End Sub
但我似乎无法在 Dev Express 的 GridView 中找到一种方法来做同样的事情,我在 C# 但不是 VB.net 中找到了其他主题来解释如何做到这一点。
【问题讨论】:
标签: vb.net visual-studio datagridview datagrid devexpress