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

questions about LoadingData and LoadedData event of QDSCV

1 Answer 71 Views
DomainDataSource
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 29 Mar 2014, 02:32 AM
Hi, I've been using QDSCV for some time, it’s really great, but still I have several questions trying to seek the answers:
1.      Document says the LoadingData event is the last place that we can change the query, but the fact is if you change the query there, the paging function may act improperly, because the custom query is appended after the Take and Skip, if the custom query contains a Where method,  a wrong TotalEntityCount value will be returned. So I think why doesn’t QDSCV build the entity query after the LoadingData event, or add an BuildingQuery event, so we can prepend custom Linq queries?  Please don’t tell me to use the FilterDescriptor, I really don’t like that.
2.      Why QDSCV makes every thing internal? we can’t build our own QDSCV class base on it.
3.      I can’t get the correct page index in the LoadedData event after change page, and the MovePageTo... calls function improperly.

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimitrina
Telerik team
answered on 01 Apr 2014, 03:03 PM
Hello,

As to your questions:
1. Indeed, the e.Query you get when the LoadingData method is raised is the final query that is going to be executed. May I ask you to share a link of the document you are referring to? How do you try changing the query? 
2. The QDSCV is a very thin wrapper over the DomainContext. It does not do anything on its own -- it simply calls the DomainContext.Load method. In other words, all the works is done by WCF RIA Services -- we do not do anything additional except for building the EntityQuery based on the filtering, sorting and paging criteria.
3. When the LoadedData event is raised, the LoadedDataEventArgs does not provide an information on the current page index. Would you please clarify your question a bit?

Regards,
Didie
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
Tags
DomainDataSource
Asked by
xu
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or