How do I use the Datagrid.SelectedItem to select a row programmatically?
Do I first have to create a IEnumerable of DataGridRow objects and pass the matching row to this SelectedItem property or how do I do it?
EDIT:
I need to match the cell content of the first columns cell with a TextBox.Text first, before selecting the row.
My code iterates through cells of the
datagrid‘s first column and checks if cell content equals to thetextbox.textvalue and selects the row.