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#.
private void DataGrid_SelectionChanged(object sender, SelectionChangeEventArgs e)
{
display.Text = Datagrid.SelectedItem.ToString();
}
This displays all columns, but i only want second column, the second colummn header is Name.
var query = from loan in Loans
select new {Date = loan.StatusCommittedDate, Name = loan.PublicationName}
DataGrid.ItemsSource = query.ToList();