DataGrid get selected rows' column values it can be access by below code. Here grid1 is name of Gride.
private void Edit_Click(object sender, RoutedEventArgs e)
{
DataRowView rowview = grid1.SelectedItem as DataRowView;
string id = rowview.Row[0].ToString();
}