Deleting rows in a datagridview
<p>I'm trying to delete rows in a datagridview but its only deleting a select few from the bottom up of records that qualify. I need it to delete ALL the records. Please help! Here is my code: </p>

<pre><code>For n As Int32 = DataGridView1.Rows.Count - 1 To 0 Step -1
        Dim c As Boolean
        c = DataGridView1.Rows(n).Cells(0).Value
        If c = True Then
            DataGridView1.Rows.RemoveAt(n)
        Else
        End If
    Next n
</code></pre>

<p>Note: This code works on shorter lists but on larger lists it only deletes some of the selected records. By selected I mean records with the "c = True"</p>