Open RIA Services User Support DomainDataSource stops tracking entities  Viewed 17830 time(s), 2 post(s)., 9/17/2014 5:25:46 PM - by TDenis

TDenis 9/17/2014 5:25:46 PM

I have a DataGrid bound to the DomainDataSource.DataView.

I make following steps:
1. Load the data: DomainDataSource.Load
2. Create and add a new entity using DomainDataSource.DataView.Add
3. DomainDataSource.SubmitChanges
4. Remove any entity using DomainDataSource.DataView.Remove
5. DomainDataSource.SubmitChanges
5.1. Server throws an exception (not allowed to delete the entity for some reason, referential integrity or whatever)
6. DomainDataSource.RejectChanges

Then I get the issue - the removed entity is not re-appearing in the DataGrid.
DomainContext changes the state of the entity from Deleted to Unmodified, but the DomainDataSource does not return it to the DataView collection.
If I reload the DomainDataSource after step 3, then it works fine. But the large amount of data is transferred for no reason.

Is it a bug or by design? Is it possible to make it work without a reloading?

This content has not been rated yet. 
86 Reputation 8 Total posts
TDenis 9/18/2014 7:01:14 AM

Created an issue at Codeplex (with some more details):

This content has not been rated yet. 
86 Reputation 8 Total posts