questions about LoadingData and LoadedData event of QDSCV

2 posts, 1 answers
  1. xu
    xu avatar
    14 posts
    Member since:
    Feb 2012

    Posted 28 Mar 2014 Link to this post

    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.
  2. Answer
    Dimitrina avatar
    3769 posts

    Posted 01 Apr 2014 Link to this post


    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?


    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.

Back to Top