How do I use the Datagrid.SelectedItem to select a row programmatically?
Do I first have to create a IEnumerable of DataGridRow
I've searched solution to similar problem and maybe my way will help You and anybody who face with it.
I used SelectedValuePath="id" in XAML DataGrid definition, and programaticaly only thing I have to do is set DataGrid.SelectedValue to desired value.
I know this solution has pros and cons, but in specific case is fast and easy.
Best regards
Marcin