private void Kundeoversigt_dataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e) { DataGrid gd = (DataGrid)sender; DataRowView row_selected = gd.SelectedItem as DataRowView; if (row_selected != null) { Konto konto = new Konto(); konto.textBoxinthewindow.Text = row_selected["CPR"].ToString(); textBox.Text = row_selected["CPR"].ToString(); } }
private void Kundeoversigt_dataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e) { Konto konti = new Konto(); konti.Show(); }