Hello,
I would like to select all items of all rows but just from one column. In a dropbox its quite easy but how do I do this in field?
This is how I do right now...
The column I would like to read is DataGridViewTextBoxColumn32.Index
Thanks
Btw. VB2008
ok, so its works:
But I dont like it, Can I not do it without the i?
I would like to select all items of all rows but just from one column. In a dropbox its quite easy but how do I do this in field?
This is how I do right now...
VB.NET:
Dim i As Integer
Dim rowindex As DataGridViewRow
Dim columnindex As DataGridViewColumn
'For Each columnindex In HardwareDataGridView.Columns
For Each rowindex In HardwareDataGridView.Rows
i = i + 1
MsgBox(HardwareDataGridView(rowindex).Value.ToString())
'MsgBox(HardwareDataGridView.Item(HardwareDataGridView.CurrentRow.Index, HardwareDataGridView.CurrentCell.Value).Value)
Next
The column I would like to read is DataGridViewTextBoxColumn32.Index
Thanks
Btw. VB2008
ok, so its works:
VB.NET:
Dim i As Integer
Dim rowindex As DataGridViewRow
Dim columnindex As DataGridViewColumn
'For Each columnindex In HardwareDataGridView.Columns
For Each rowindex In HardwareDataGridView.Rows
MsgBox(HardwareDataGridView.Rows(i).Cells(DataGridViewTextBoxColumn32.Index).Value)
i = i + 1
'MsgBox(HardwareDataGridView.Item(HardwareDataGridView.CurrentRow.Index, HardwareDataGridView.CurrentCell.Value).Value)
Next
But I dont like it, Can I not do it without the i?
Last edited: