I am loading a child grid with data based on changing the current row on the parent grid. It is working fine until an edit needs to be saved. The code executed when the page is loaded, or the row is changed is
private void link_load(object sender)
{
var query = Global.mgr.ManufacturerLinks.Where(m => m.ManID == ((Ashlin.Model.Manufacturer)(((Telerik.Windows.Controls.DataControl)(sender)).CurrentItem)).ManID);
var op = query.ExecuteAsync();
op.Completed += (s, args) => linkgrid.ItemsSource = args.Results;
}
If attempting to save changes, the parent works fine but the child has this error.
Coded 4004
ManagedRunTimeError
EntityManagerSaveException: unable to update the EntitySet 'ManufacturerLinks' because it has a DefiningQuery and no...
If cancel is executed this code works perfectly
Global.mgr.ManufacturerLinks.EntityManager.RejectChanges();
The parent data is handled by a viewmodel and repository. The child data is retrieved in the code behind using the code above.
It is my workaround since I am still unable to grasp passing arguments to a repository.