Find and sum value of a datagridview column in vb.net
<p>I want to find and sum qty value of searched id in data grid view column am using this  code</p>

<pre><code>Dim tqty As Double
For Each row As DataGridViewRow In dgv.Rows
    If row.Cells.Item(0).Value = cmbItemCode.Text Then
        tqty += row.Cells.Item(4).Value
        Textbox1.text=tqty
        Exit For
    End If
Next
</code></pre>

<p>The problem is that <code>Textbox1</code> shows only one top searched row value. For example</p>

<pre><code>id     item name    qty
1      abc           4
2      xyz           10
1      abc           10
</code></pre>

<p><code>Textbox1</code> shows the Result only 4.</p>