Getting RowIndex based on the multiple selected cells on a DataGridGiew

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ThizIz
    New Member
    • Oct 2015
    • 1

    Getting RowIndex based on the multiple selected cells on a DataGridGiew

    I'm trying to get the row indices based on my multiple selected cells on a DataGridView. How can I do that in VB.NET?

    This is what I have:
    Code:
    If e.RowIndex >= 0 Then
                Dim row As DataGridViewRow
                row = Me.DataGridView1.Rows(e.RowIndex)
                sno.Text = row.Cells("F2").Value.ToString
                sname.Text = row.Cells("F3").Value.ToString
                final.Text = row.Cells("F16").Value.ToString
            End If
Working...