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.
Basically your button will inherit the datacontext of a row data object. I am calling it as MyObject and hope MyObject.ID is what you wanted.
private void Button_Click(object sender, RoutedEventArgs e)
{
MyObject obj = ((FrameworkElement)sender).DataContext as MyObject;
//Do whatever you wanted to do with MyObject.ID
}