Multiple Entities with Include

2 posts, 0 answers
  1. Jeff Waddell
    Jeff Waddell avatar
    16 posts
    Member since:
    Jul 2004

    Posted 20 Apr 2011 Link to this post

    Can the Domain Data Source work with multiple entities returned from a query using include?

    How would you bind two grids to a single domain source and specify the entity collections they should bind to?

  2. Rossen Hristov
    Rossen Hristov avatar
    2478 posts

    Posted 20 Apr 2011 Link to this post

    Hello Jeff Waddell,

    You can't do that in the way you describe it. Don't use Include because it will fetch more data than needed.

    If you have two RadDomainDataSources one can display the master entities and the other the detail ones. The one for the detail entities can have a QueryParameter which will accept the master entity ID and fetch only the relevant child entities from the server. Then you can somehow bind the Value of this QueryParameter to the SelectedItem of the master grid or its ID or whatever is the primary key. In this way, each time the user selects a different row from the master grid, the binding will trigger, the QueryParameter.Value of the details RDDS will change and if it is AutoLoad it will go to the server and take all the relevant child records.

    You will have two grids with master-details relationship both pulling data from the server.

    Here is my series of blog posts, which you might find interesting:

    I hope this helps. Let me know if there are problems.

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top