Hi I have a datagridview with multiselection set to true. How would I go about letting a user delete all BUT the selected rows in a datagridview?
I tried this, but it doesn't seem to work:
For Each r As DataGridViewRow In DataGridView1.Rows
If r.Selected = False Then
DataGridView1.Rows.Remove(r)
End If
Next