12
Answers

C# WPF get the cell value from the selected row

Alexander

Alexander

9y
43.5k
1
Hey,

how can I get the cell value from the selcted row in Datagrid?
Normally I do this like this:

private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
        string ID;
        ID = dataGridView1.SelectedCells[0].Value.ToString();
}

But how can i do this within a WPF application?
Thanks

Answers (12)