title: VB.NET WPF How to get the column value from datagrid?
body: <p>So I am not quite familiar with WPF yet and in WinForms, you can have CellDoubleClick event which I can get the value like</p>
  
  <pre><code>row.Cells("ID").Value.ToString()
  </code></pre>
  
  <p>But in WPF, row is not a member of datagrid. So how can I get the value of the selected ID if user just double click on the row?
  <a href="https://i.stack.imgur.com/cjLDv.png" rel="nofollow"><img src="https://i.stack.imgur.com/cjLDv.png" alt="enter image description here"></a>
  Here is a picture to clarify my question. The record shown is from a datatable. When multiple  row of records is shown, and the user double click on any of the row, how do I get the value of the selected row ID? To get the selectedIndex is easy but I am lost trying to figure out how do I get the value of the ID.</p>
  
  <p><strong>-------UPDATE-------</strong></p>
  
  <p>So in <strong>WinForms</strong>, I would obtain the ID like this but not sure how in WPF.</p>
  
  <pre><code>Private Sub DataGridView1_CellDoubleClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellDoubleClick
      If e.RowIndex &gt;= 0 Then
          Dim row As New DataGridViewRow
          row = Me.DataGridView1.Rows(e.RowIndex)
          THE_ID = row.Cells("ID").Value.ToString() 'The ID is saved
      End If
  End Sub
  </code></pre>