Private Sub GridWithLoop()
Dim sum As Integer = 0
Dim sum2 As Integer = 0
Dim allrow As DataGridViewRow
Dim band As DataGridViewBand
For i As Integer = 0 To DataGridView2.Rows.Count() - 1 Step +1
'sum = sum + DataGridView2.Rows(i).Cells(1).Value'
allrow = DataGridView2.Rows(i)
If allrow.Cells(1).Value.ToString = TextBox1.Text Then
'Nothing happen'
Else
band = DataGridView2.Rows(i)
band.Visible = False
End If
Next
End Sub
Não estou conseguindo fazer funcionar, dá erro quando tento colocar o row como invisível, alguem pode me ajudar?