This is a migrated thread and some comments may be shown as answers.

Why does the QueryableDomainServiceCollectionView reload data when submit successfully completed?

1 Answer 52 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
xu
Top achievements
Rank 1
xu asked on 20 Mar 2012, 02:38 PM

Hi,

When I using the  QueryableDomainServiceCollectionView to submit changed data,  I find that it always reload the data after the submit succeed. I just wandering why does that need to happen, since the DomainContext will automaticly refresh the data after its SubmitChanges calls.

1 Answer, 1 is accepted

Sort by
0
Accepted
Rossen Hristov
Telerik team
answered on 20 Mar 2012, 03:29 PM
Hello,

This behavior is by design. The QDSCV needs to load data from the server after the changes were submitted to make sure it is in a consistent state. It does not "listen" for the DomainContext -- it simply uses it to submit a query to the server and when data arrives back it "fills" itself up with the entities returned from the server.

If you want, you can attach to the LoadingData event and cancel it only one time (i.e. with a flag) after you know that this load is caused by submitting changes.

I hope this helps.

Greetings,
Ross
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
General Discussions
Asked by
xu
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or