30-10-18, 08:15 PM
كود :
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim total As Double = 0
For Each r As DataGridViewRow In Me.DataGridView1.Rows
If r.IsNewRow Then Exit For
If r.Cells(0).Value.ToString = "خالد" Then
total += Val(r.Cells(1).Value)
End If
Next
TextBox1.Text = total
End Sub
