I have 2 DataGridViews on a form. The 2nd DGV is manually loaded based on selections from the 1st DGV. My problem is that when I go to remove the rows (I click on a button) in the 2nd DGV, it removes all but 2 rows and what's even stranger and I'm not sure why this happens is that when I go to add rows again to the 2nd DGV, there are blank rows representing the deleted rows as well as the new rows. I hope this makes sense.
Anyway, I need to be able to permanently remove all the rows at once or just selected ones. Below is the code that I use for removing all rows.
If dgvSTSelectedEquipment.Rows.Count > 0 Then
For Each row As DataGridViewRow In dgvSTSelectedEquipment.Rows