Parent-Child view implementation

10 posts, 0 answers
  1. Phi
    Phi avatar
    19 posts
    Member since:
    Jun 2007

    Posted 01 Jul 2007 Link to this post

    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

  2. rbell
    rbell avatar
    4 posts
    Member since:
    Apr 2007

    Posted 02 Jul 2007 Link to this post

    I to am having to implement this same structure and although the documentation hints that this truely is a capability of the GridView for WinForms (http://www.telerik.com/help/WinForms/Q1_2007/grdStructureOverview.htm - scroll to description of MasterTableView), I am unable to locate any examples, nor am I able to get it to recognise any relationships in the dataset.

    Can anyone help us with this?

    Randy
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Mike
    Admin
    Mike avatar
    640 posts

    Posted 03 Jul 2007 Link to this post

    Hi guys.

    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
  5. rbell
    rbell avatar
    4 posts
    Member since:
    Apr 2007

    Posted 03 Jul 2007 Link to this post

    Thanks Mike for your update.   I will leave the "How" to you guys...your already good at that ;-) .  However, I can share some wishes on some specific functionality I'd like to see:

    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
  6. Phi
    Phi avatar
    19 posts
    Member since:
    Jun 2007

    Posted 03 Jul 2007 Link to this post

    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

  7. Mike
    Admin
    Mike avatar
    640 posts

    Posted 04 Jul 2007 Link to this post

    Thank you for the elaborations, guys. We  are glad that we share the vision of how grid hierarchy should behave for best usability and effectiveness. Your wishes are logged in our to-do list and hopefully they will be present in Q2. Keep us updated in case you come up with any other ideas.
     

    Kind regards,
    Mike
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  8. Emanuele Savarese
    Emanuele Savarese avatar
    14 posts
    Member since:
    Apr 2007

    Posted 06 Jul 2007 Link to this post

    It's possible get Q2 beta with hierarchy functions?
  9. Vassil Petev
    Admin
    Vassil Petev avatar
    1765 posts

    Posted 06 Jul 2007 Link to this post

    Sure Arcangelo, we have logged your name in our beta test program. We will notify you by email once we have the beta out.

    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
  10. Phi
    Phi avatar
    19 posts
    Member since:
    Jun 2007

    Posted 06 Jul 2007 Link to this post

    Hi Rob,

    I'd definitely like to take part in the beta program to test Parent-Child view functionality in the GridView.

    Cheers
    Phi
  11. Vassil Petev
    Admin
    Vassil Petev avatar
    1765 posts

    Posted 06 Jul 2007 Link to this post

    Thank you for the interest in the beta, Phi, you have been subscribed to the program.


    Sincerely yours,
    Rob
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top
UI for WinForms is Visual Studio 2017 Ready