Hey there! You guys have been extremely helpful, thank you. I have a question regarding the DataGridView. What I'm trying to do is take all the values from one column of a DataGridView and put that in either an array, textbox, anything. So far, I have only been able to get the current selected value, not the entire list. Here is the code so far:

        Dim i As Integer
        i = DataGridView1.CurrentRow.Index
        Me.Label2.Text = DataGridView1.Item(0, i).Value

This will show me in a label the current selected entry, not the full list. I'm assuming I need to create an array and then spool the list, however I'm unsure of where to start on that. Any help will be appreciated. Thanks!

Use list or or Array to hold
Dim sList as new list(of String)
you must use the loop here something like below
For i as integer=0 to DataGridView1.rows.count-1
sList.items.add(DataGridView1.rows(i).item("Column index or Name"))
Next
Note:The above code is not exact code or syntax.. Just an idea to start with...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.