title: Search in column datagridview return value coresponding value datadgridview vb.net
body: <p>I have a <code>datagridview</code> in <code>vb.net</code> with three columns. In the first column, a product description, in the second column there is a product number and in the third column, a price is given.</p>
  <p>I would like to search in a <code>datagridview</code> by product number and return the corresponding value in the prices column.</p>
  <p>I can to search for  text in <code>datagridview</code>s, but I can't read the value of a corresponding cell such as the price cell.</p>
  <pre><code>Private Sub Button33_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button33.Click
      Dim rowindex As String
      For Each row As DataGridViewRow In DataGridView1.Rows
          If row.Cells.Item(&quot;ITEM_ID&quot;).Value = TextBox5.Text Then
              rowindex = row.Index.ToString()
  
              Dim actie As String = row.Cells(&quot;PRICE&quot;).Value.ToString()
              MsgBox(actie)
  
          Else
  
              MsgBox(&quot;Item not found&quot;)
  
          End If
      Next
  End Sub
  </code></pre>