如何从VB.Net中的DataGridView获取单元格值?
问题描述:
我有一个问题,如何从datagridview单元中获取价值
I have a problem, how can i get value from cell of datagridview
----------------------------------
id | p/w | post |
----------------------------------
1 | 1234 | A |
----------------------------------
2 | 4567 | S |
----------------------------------
3 | 6789 | A |
----------------------------------
我想在文本框中输入3,该怎么做?谁能提供一些示例编码?
比您〜
I want to get 3 into the textbox,how to do that? Can anyone give some example coding? than you~
答
该行如下所示:
Dim x As Integer
x = dgvName.Rows(yourRowIndex).Cells(yourColumnIndex).Value