QueryableDomainServiceCollectionView not loading query

2 posts, 0 answers
  1. Valentin Raceanu
    Valentin Raceanu avatar
    10 posts
    Member since:
    Jun 2012

    Posted 05 Dec 2011 Link to this post

    A few details of my application:
    • Silverlight, Ria Services
    • I use an application-wide domain context even though I have multiple pages
    • I use MVVM design pattern with QueryableDomainServiceCollectionView (QDSCV)

    In page1 I have a RadGridView that binds to UsersView:
    public class UsersManagementVM : INotifyPropertyChanged
            static UMContext _umCtx = DomainContexts.UserManagementContext;
            class UsersCollectionView : Telerik.Windows.Data.QueryableDomainServiceCollectionView<Users>
                public UsersCollectionView(DomainContext domainContext, EntityQuery<Users> entityQuery)
                    :base(domainContext, entityQuery)
                    AutoLoad = true;
            public Telerik.Windows.Data.QueryableDomainServiceCollectionView<Users> UsersView
                    return vUI.Manager.FromCache<UsersCollectionView>(delegate
                        var y = new UsersCollectionView(_umCtx, _umCtx.GetAllowedUsersQuery(CurrentUser.UserId));

    The problem is that when I modify the domain context in another page and go back to page1 then GetAllowedUsersQuery is not called anymore.

    Thank you!
  2. Rossen Hristov
    Rossen Hristov avatar
    2478 posts

    Posted 05 Dec 2011 Link to this post

    Hi Valentin Raceanu,

    When you have made changes to the DomainContext, you have to either submit or cancel them before you can load again. The alternative is to use different contexts for viewing and editing purposes.

    All the best,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top