0
votes

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

1
So I worked around this by calling my GetAccounts method within my SetAccountsCallback function. Guy here at the office said it was required with 100% sproc db access.Scott Silvi

1 Answers

0
votes

So I worked around this by calling my GetAccounts method within my SetAccountsCallback function. Guy here at the office said it was required with 100% sproc db access.