Share QDSCV through Views

4 posts, 0 answers
  1. Waleed Seada
    Waleed Seada avatar
    241 posts
    Member since:
    May 2006

    Posted 06 Mar 2011 Link to this post

    Dear All,

    I have a scenario where I get list of accounts using QDSCV then bound it to RadGrid.
    The user can select row and click edit, I then pass the accountID to the AccDetailview View, and then I retrieve the account data from the database and then bind it to xaml so the user can edit and submit changes.

    My question is:
    Can I pass the QDSCV currentitem for edit in the detailview view and update the database, when the detailsview return the updated object to the AccountsView or I should pass the whole QDSCV ?

    Any feedback is appreciated
    Waleed

    EDITED:
    ---------
    I have tried the proposed solution but get very strange error when calling the submitchanges on DomainContext. the error says: submitchanges is already in progress for the same domaincontext.
    Could this have anything to do with the proposed solution.

    Regards
    Waleed
  2. Waleed Seada
    Waleed Seada avatar
    241 posts
    Member since:
    May 2006

    Posted 07 Mar 2011 Link to this post

    Dear All,

    I have implemented already the proposed solution and I am passing the whole QDSCV through the regionContext.
    The update is much smother and I believe delete will also be easy.

    I have a problem with the Addition;
    When the user click new toolbar button, I create a new object from my entity and assign the new id for it and other initial data for this new entry, and then I call QDSCV.Add(new object) and when I navigate to the new page, I found everything is there except the comboboxs, they don't contain any data ....

    I believe this is due to errors in QDSCV because the comboboxs where fine until I add the addition functionality ...

    Any guidelines about that.

    Regards
    Waleed
  3. DevCraft banner
  4. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 09 Mar 2011 Link to this post

    Hello Waleed Seada,

    We have two options.

    1. If you believe that there is a problem with the QDSCV, can you prepare a runnable sample project that isolates the problem and reproduces this behavior. We will then take a look at it and see what is going on.

    2. Alternatively, you can develop the same functionality without the QDSCV, i.e. without any Telerik controls, and check whether the behavior would be the same or different. You can use Microsoft's DomainDataSourceView collection which is the Microsoft's analog of Telerik's QDSCV, i.e. it is Microsoft's collection that is used for MVVM purposes. You can learn more about this collection from this blog post.

    Let us know once you have one of the two options implemented.

    Thanks in advance.

    Regards,
    Ross
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  5. Waleed Seada
    Waleed Seada avatar
    241 posts
    Member since:
    May 2006

    Posted 12 Mar 2011 Link to this post

    Hello Ross,

    I believe that I found the problem, it is in using the QDSCV not the collection itself.

    I believe that before using the Add of the collection I have to Call BeginEdit and EndEdit after that, Also I found a better approach using the QDSCV currentitem instead.

    It is good to know that when QDSCV has a problem it is reflected to other controls as well !!

    I appreciate your help indeed

    Waleed
Back to Top