title: Getting content from WPF GridViewColumn through Button
body: <p>I have a Button within a GridView within a ListView. When the button is clicked, I would like to get the text from the corresponding row of the Grid View for that button. Can anyone help me with the code for this?</p>
  
  <p>My XAML is:</p>
  
  <pre><code>&lt;ListView Name="resultList" ItemsSource="{Binding}" DockPanel.Dock="Top"&gt;
   &lt;ListView.View&gt;
    &lt;GridView AllowsColumnReorder="true" ColumnHeaderToolTip="Test Results Summary"&gt;
     &lt;GridViewColumn DisplayMemberBinding= "{Binding Date}" Header="Date" Width="Auto"/&gt;
      &lt;GridViewColumn DisplayMemberBinding= "{Binding Status}" Header="Status" Width="Auto"/&gt;
       &lt;GridViewColumn Header="" Width="Auto"&gt;
        &lt;GridViewColumn.CellTemplate&gt;
         &lt;DataTemplate &gt;
          &lt;Button x:Name="btnRemoveTest" Click="_viewResult" Content="View" Height="20" Width="100"/&gt;
         &lt;/DataTemplate&gt;
        &lt;/GridViewColumn.CellTemplate&gt;
       &lt;/GridViewColumn&gt;
      &lt;/GridView&gt;
     &lt;/ListView.View&gt;
    &lt;/ListView&gt;
  </code></pre>
  
  <p>What can I do in here:</p>
  
  <pre><code>private void _viewResult(object sender, RoutedEventArgs e)
  {
  }
  </code></pre>