How can I determine SelectedCell‘s Value In DataGrid? (WPF)
My DataGrid has 9 coloums and 5 rows and I want to know the Value of clicked row[0]’s Value.
I used this code in Windows Form:
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
var a = dataGridView1[e.ColumnIndex, e.RowIndex].Value;
}
but I don’t know an equivalent code in wpf.
You should use DataGrid_SelectedCellsChanged event.
HTH