title: Grabbing second column value of Datagrid
body: <p>Hi I'm trying to grab the second column value on click and to display in a text box but im really new to C#. </p>
  
  <pre><code>private void DataGrid_SelectionChanged(object sender, SelectionChangeEventArgs e)  
  {  
     display.Text = Datagrid.SelectedItem.ToString();  
  }  
  </code></pre>
  
  <p>This displays all columns, but i only want second column, the second colummn header is Name. </p>
  
  <pre><code>var query = from loan in Loans  
          select new {Date = loan.StatusCommittedDate, Name = loan.PublicationName}  
  
  DataGrid.ItemsSource = query.ToList();
  </code></pre>