在Datagrid视图中选择上次使用的文本 [英] Select Last Used Text in Datagrid View
本文介绍了在Datagrid视图中选择上次使用的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好b $ b
我有一个数据网格视图,其中包含1列&几行
我的代码如下:
Hi
i have a data grid view with 1 column & several rows
my code is like :
DataGridView1.DataSource = Serials1DataTable.GetData
For Each row in DataGridView1.DataSource
MsgBox('Each Rows Value')
Next
i试图使用
i have tried to use
DataGridView1.CurrentCell.Value.ToString
但是我得到3个带有1个值的msgbox(第一个值)
i希望获得3个带有3个值的msgbox,
任何人都可以帮助我吗?
but i get 3 msgbox with 1 value (first value)
i want to get 3 msgboxes with 3 values
can anyone help me ?
推荐答案
foreach(DataGridItem dataGridItem in DataGridView1.Items){
MsgBox('Value is'+dataGridItem.Cells[0].Text)
}
这篇关于在Datagrid视图中选择上次使用的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文