Hi,
how can i bind the selected row to my viewmodel? My problem is this: i bound the itemssource to the vm (works fine, the elements are shown) but in the code behind of the view the xamgrid has no rows. So i cannot set the selected row this way: myxamgrid.SelectionSettings.SelectedRows.Add(selectedRow);
What can i do?
You may want to try this:
private void GridReview_SelectedRowsCollectionChanged(object sender, SelectionCollectionChangedEventArgs<SelectedRowsCollection> e){ _viewModel.SelectedItemModel = e.NewSelectedItems.SingleOrDefault().Data as ItemModel;}