Hi,
I want to know how to implement a parent-child scenario in a GridView. I have a datasource which contains the "parent" rows, and for each parent row, I want to be able to "expand" and see another gridview which contains the child rows.
Parent and child tables do not have the same columns, and my datasource is a collection of objects.
Couldnt' find an example of this in the included samples.
Regards,
Phi Le
9 Answers, 1 is accepted

Can anyone help us with this?
Randy
Even though the object-structure of RadGridView is designed to handle master-detail scenarios, this functionality is still not present in the current version of the product. We are working on it and it is expected no later than the Q2 release.
In the meanwhile, it would be very great if you share your ideas on how you would like to see this feature implemented in RadGridView.
Regards,
Mike
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center

As far as visual representation, I'd like to see the details for each parent by expanding the details (children) - similar to expanding the groups and similar to what is presented in the documentation link I gave in my earlier post.
I'd like to see the GridView be able to present the hierarchy views for not only datasets where relations are defined, but also business objects where children are represented as public properties that return objects that implement IEnumerable. Other DataGrids I have seen display hierarchies only on datasets and you could go a long way by also presenting hierarchical data for business objects. This should should be easily accomplished by utilizing reflection upon the bound data type.
I look forward to seeing what you come up with! I really like the look and feel of RadControls for WinForms so far. I realize its still in its child hood and has some functionality to be still built out, but its quite impressive for such a young product!
Randy

Further to Randy's excellent suggestions, I have used other GridView components that take it one step further, and allow the "child" view to be any datasource unrelated to the parent. They do this by letting you subscribe to something like an "OnParentRowDataBound" event, where you can specify if
- That particular parent row has a child view or not
- The child view data source for that parent row
Of course this would only be an extra option for flexibility. For basic scenarios, you should just specify the child as being an IList/IEnumerable property of the parent, then the GridView should take care of the rest.
Cheers
Phi
Kind regards,
Mike
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center

If anyone else wants to participate in the beta program, please post here. We do not have any restrictions and we award Telerik points to all who participate!
Greetings,
Rob
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center

I'd definitely like to take part in the beta program to test Parent-Child view functionality in the GridView.
Cheers
Phi
Sincerely yours,
Rob
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center