Alexander

Alexander

  • NA
  • 18
  • 84.9k

C# WPF get the cell value from the selected row

Aug 13 2012 1:09 PM
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)