Binding GridView to heirarchical collection

3 posts, 0 answers
  1. Matt
    Matt avatar
    1 posts
    Member since:
    Mar 2010

    Posted 29 Mar 2010 Link to this post

    I have a collection of say invoices that has a collection of invoice details or line items and a collection of payements.  I want to bind the gridview to the collection without manually creating all of the columns and such.  When I use the Invoice collection as the datasource I do not get the children of invoice, only the single column.  I am setting autoGenerateHeirarchy.  Do I need to define the relationships to accomplish this, even though they are well defined already?


  2. Tim Weckx
    Tim Weckx avatar
    4 posts
    Member since:
    Mar 2010

    Posted 31 Mar 2010 Link to this post

    The AutoGenerateHierarchy property only works for datasets that have relationships defined between datatables.

    More info can be found in the WinForms - GridView documentation:
  3. Julian Benkov
    Julian Benkov avatar
    1135 posts

    Posted 01 Apr 2010 Link to this post

    Hello Matt,

    The auto generate mechanism of RadGridView currently works only with a DataSet object. You must set DataSource to your DataSet object and DataMember to the root Table, in your case DataMember = "Invoices". Your DataSet also must define relations between the inner Tables.

    As Tim has suggested, you can find additional information in our online documentation.

    Sincerely yours,

    Julian Benkov
    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.
Back to Top