I have the following code in which it supposed to remove rows that have the first column checkboxes checked, but it only removes one row at a time.
If you have more than one checkbox checked, you have to click the command button each time to remove the row.
It seems that the logic is correct to remove multiple rows if more than one checkbox is checked, but it doesn't work.
Public Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
For Each row As DataGridViewRow In DataGridView1.Rows
If row.Cells("Delete").Value = True Then
DataGridView1.Rows.Remove(row)
End If
Next
End Sub