I am looking to set up a Master/Detail scenario with a dataform & datagrid using Mvvm Light Toolkit in SL4.
I am using SOAP to hit a DB & populate an ObservableCollection property aptly named Accounts.
I have bound (all of my bindings are declarative) my DataGrid.ItemsSource to the Accounts OC. I've then bound my DataGrid.SelectedItem to an ObservableCollection SelectedAccount property. Finally, my DataForm.CurrentItem is also bound to SelectedAccount.
Now, when I select an item in my DataGrid, my DataForm correctly displays the selected record. When I edit a record & click OK, I'm saving the record to the DB. In the process, I have a callback function that is eventually hit in my ViewModel:
private void setAccountsCallback(bool result)
Inside of that, I've tried to RaisePropertyChanged("Accounts") to refresh my Gridview, but to no avail. Oddly enough, if I navigate back to my dataform, the value is changed there (my dataform animates in on selectionChanged of gridview, and animates out on EditEnded).
Any thoughts?
Scott