We need to get the value from the first cell of the DataGrid row.
How to do it?
Found the answer. Everything turned out to be quite simple.
private void DataGridRow_MouseDoubleClick(object sender, MouseButtonEventArgs e) { DataGridRow row = sender as DataGridRow; if (row != null) { // dg - мой DataGrid TextBlock tbl = dg.Columns[0].GetCellContent(row) as TextBlock; Data = tbl.Text; } } Source: https://ru.stackoverflow.com/questions/928930/
All Articles