Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
300
VirtualCollection and Best Practices for Paging and Querying
posted

I am looking for a best practices or sample showing how a user would query for varying collection counts in the ui and adjust the "AnctipatedSize" property of a virtual collection accordingly to reflect proper total pages.

For example, we use EntityQueries in RIA, should the query be executed and returned in total to a viewmodel private collection to get the actual count and adjust the anticipated size (to get a correct page count), then using SkipTake against that private cache for paging?

Thanks

Parents
No Data
Reply Children
  • 300
    posted in reply to [Infragistics] Vlad Zagorski

    The DataPage model, assuming it is what was presented here, is a potential solution yet I am wondering what can be done with EntityQueries in WCF RIA.  You have another presentation that I would like to see expanded upon to show how to better deal with the server processing vs silverlight client and paging, while using EntityQueries and VirtualCollections. 

    Now whether the DataPage<T> response model should/could be combined with the RIA methods on the DomainService, and requests to page go to the service on each page.

    Or do what I did and return the complete result set to a ViewModel and have the count done there by setting IncludeTotalCount = true on the initial EntityQuery and just use the VirtualCollection to handle the rendering of the prefectched data to the grid with linq.

    I just would like to know your thoughts, hope I haven't confused matters.

    Regards,

    Adam