title: Get the actual value of a BoundField element in a gridview VB.NET
body: <p>The following image depicts the full gridview I have:</p>
  
  <p><a href="https://i.stack.imgur.com/EBm8R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EBm8R.png" alt="enter image description here"></a></p>
  
  <p>I'm able to get the values of the second column (project_ID) in the back end as follows:</p>
  
  <pre><code>Dim val As String = grdProjects.SelectedRow.Cells(1).Text.ToString
  </code></pre>
  
  <p>For instance if I press the <em>Select</em> of the third row I'll get back the value 3.
  My problem appears when the gridview is updated and has less records as the one in the following image.</p>
  
  <p><a href="https://i.stack.imgur.com/lYaAC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lYaAC.png" alt="enter image description here"></a></p>
  
  <p>If I press the second record I get the value 2 instead of the value 4 that I'd like to get.</p>
  
  <p>Any suggestions please on how to get the actual value of the cell instead of the number of the selected row?</p>