I will typically go through in reverse order, iterating instead of using foreach. So, it would be something like this:
| |
Dim row As DataGridViewRow Dim i As Integer For i = Me.DataGridView.Rows.Count - 1 To 0 Step -1 row = Me.DataGridView.Rows(i) row.Cells("WHATEVER").Value = "0" Next i
|