littlebigman
Well-known member
- Joined
- Jan 5, 2010
- Messages
- 75
- Programming Experience
- Beginner
Hello
I'm beginning to learn VB 2008 with the Express Edition IDE, and have a question about using the DataGridView control.
I'd like to be able to refer to columns by their name instead of their index:
Is this possible or are we required to always use indexes?
Thank you.
I'm beginning to learn VB 2008 with the Express Edition IDE, and have a question about using the DataGridView control.
I'd like to be able to refer to columns by their name instead of their index:
VB.NET:
With DataGridView1
.ReadOnly = True
.RowHeadersVisible = False
.ColumnCount = 2
.Columns(0).HeaderText = "My File"
.Columns(0).Name = "File"
.Columns(1).HeaderText = "First Line"
.Columns(1).Name = "Data"
'.Item("Key","Value").Value = "test"
.Item(0, 0).Value = "test"
End With
Is this possible or are we required to always use indexes?
Thank you.