For Each r As DataGridViewRow In DataGridView1.SelectedRows
If Not r.IsNewRow Then
DataGridView1.Rows.Remove(r)
End If
Next
It’s an IsNewRow attribute that determines if it’s the newly selected row. If it’s not, remove!
For Each r As DataGridViewRow In DataGridView1.SelectedRows
If Not r.IsNewRow Then
DataGridView1.Rows.Remove(r)
End If
Next
It’s an IsNewRow attribute that determines if it’s the newly selected row. If it’s not, remove!