I have this DataTable called ProductTablethat have 3 columns that serves as the source for the DataGridView ProductGrid.
When clicking on the button DeleteRow, the user should delete the row in ProductTable that correspond the selected row in ProductGrid
I tried with
Private Sub DeleteRow_Click(sender As Object, e As EventArgs) Handles DeleteRow.Click
Dim i As Integer
For i = 0 To 100
Try
ProductTable.Rows(i).Delete()
Catch ex As Exception
End Try
Next
End Sub
But I'm missing something obvious : The condition that allows me to pick the row in the DataTable that would correspond to ProductGrid.SelectedCells(0).Value.ToString().
But I don't know how to do it, as ProductTable.Rows(i).Columns(0).Value doesn't work since Columns isn't a member of the Row object.
