终于完成你的题目!时间太晚了!!
关键代码:
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的值,就可以对显示所选中的行的数据了。
张志晨