I\'ve set the itemsource of my WPF Datagrid to a List of Objects returned from my DAL. I\'ve also added an extra column which contains a button, the xaml is below.
Another way I like to do this is to bind the ID to the CommandParameter property of the button:
View Details
Then you can access it like so in code:
private void Button_Click(object sender, RoutedEventArgs e) { object ID = ((Button)sender).CommandParameter; }