VB中怎样把在dataGridview选中的一行(或选中的某一个值)的各列显示在指定的不同textbox中

要代码,最好带上解释,还有在什么事件中写。

终于完成你的题目!时间太晚了!!
关键代码:
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
Dim ar
'ar = DataGridView1.CurrentRow.Cells(0).Value
'ar = DataGridView1.CurrentRow.Cells(3).Value

ar = DataGridView1.CurrentRow.Index
Dim k = DataGridView1.Rows(ar).Cells(3).Value()
MsgBox(k)

End Sub
用循环必应Cells(i)中i的值,就可以对显示所选中的行的数据了。
张志晨
温馨提示:答案为网友推荐,仅供参考