This is a migrated thread and some comments may be shown as answers.

Bind 2 Grids together

3 Answers 64 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Joel Palmer
Top achievements
Rank 2
Joel Palmer asked on 23 Apr 2010, 02:39 AM
I have a one to many relationship between multiple tables.

Contact -> ContactPhone
Contact -> ContactAddress
Contact -> ContactDates
Etc.

I have a main form that lists a filterable list of contacts (using paging, etc).  On selection of a contact, I need a gridview for each "many" table to populate.  Can someone give me an example of how to set up a parent/child relationship between 2 grids using binding?

I'm using SL4, Entity Framework, RIA Services and VS2010.

Thanks for your help.
Joel

3 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 23 Apr 2010, 08:57 AM
Hello Joel Palmer,

You can use the RowDetails feature of the grid. The child grid inside the RowDetails template will show the details in a master-details scenario.

Here is a blog post describing a similar architecture.

I have also prepared a sample project.

Let us know if there are problems.

Kind regards,
Ross
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.
0
Joel Palmer
Top achievements
Rank 2
answered on 23 Apr 2010, 11:37 PM
It seems my solution then would be to use the External RowDetails approach.  Am I going to be able to put the details presenter inside a Tab or even on a UserControl and assign it?  What are my limitations with the external details presenter?  Also, do you have an example for the external approach?
0
Rossen Hristov
Telerik team
answered on 26 Apr 2010, 08:39 AM
Hello Joel Palmer,

Our Row Details online example uses an external DetailsPresenter. You can control its visibility from the control panel on the right. You can place it anywhere as long as you connect it to the grid like this:

this.externalDetailsPresenter.DetailsProvider = this.radGridView.RowDetailsProvider;

This makes the connection between a RadGridView and an external details presenter.

This is described in the help topic about row details.

Let us know if you have any other questions after you have covered the help topic.

All the best,
Ross
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.
Tags
GridView
Asked by
Joel Palmer
Top achievements
Rank 2
Answers by
Rossen Hristov
Telerik team
Joel Palmer
Top achievements
Rank 2
Share this question
or