Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get value of each selected row in DataGridView

Status
Not open for further replies.

dstrange

Programmer
Nov 15, 2006
87
CA
Hi all,

I have a datagridview with multiselect on.
How can I check all the rows and just return the 1 cells value for each selected row from a button click event?

Thanks in advance
 
Nevermind. Here's the solution

Code:
        Dim dgvRow As DataGridViewRow

        For Each dgvRow In DataGridView2.SelectedRows
            msgbox (dgvRow.Cells(0).Value)
        Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top