Ttreeview from dataset with 2 datatables

3 posts, 0 answers
  1. Victoria F
    Victoria F avatar
    46 posts
    Member since:
    May 2010

    Posted 21 Aug 2010 Link to this post


    RadControls version


    .NET version


    Visual Studio version


    programming language


    browser support

    all browsers supported by RadControls

     I have problems with Rad treeview:
    I have a dataset that contains 2 datatables.
    First table : Parent_ID , Parent_Text
    Second table : Parent_ID, CHild_ID, Child_Text



    DataColumn parentColumn = gl_dsLayerLOBsWIN.Tables["PriceLayerWin"].Columns["Layer"];




    DataColumn childColumn = gl_dsLayerLOBsWIN.Tables["PriceLayerLOBWin"].Columns["Layer"];




    DataRelation relation = new DataRelation("parent2Child", parentColumn, childColumn);






    radGridView_Layers.DataSource = gl_dsLayerLOBsWIN.Tables[






    new RelationBinding("PriceLayerWIN_PriceLayerLOBWIN", gl_dsLayerLOBsWIN));


    radTreeView_Layers.DataSource = gl_dsLayerLOBsWIN;

     Initially Dataset is empty. When I add a row to Parent datatable and a couple of rows to Child Datatable I see only first level node(s)....  I do not see sublevels.
    Could you , please help me with this.
    I tried to use Gridview for this purpose also and tried to group it, but I still do not see any data for sublayers .. may be I'm missing something ...

    Thank you ,

  2. Victor
    Victor avatar
    1358 posts

    Posted 25 Aug 2010 Link to this post

    Hi Victoria,

    Thank you for writing.

    Please refer to the attached sample application. It contains projects that demonstrate how to bind RadTreeView to a data set with related tables as well as to custom related objects. The projects are in both C# and VB.

    A bit off topic, please submit your enquiries in the appropriate forum sections or in the support ticketing system. The Code Library secion is a place for exchanging code samples, sharing knowledge and getting hands-on experience.

    Thank you for your understanding.

    All the best,
    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. Stefan
    Stefan avatar
    2911 posts

    Posted 22 Mar 2011 Link to this post

    Hello Victoria F,

    Please note that in Q1 2011 we have introduced a major upgrade of RadreeView control, which is now virtualized and fully customizable. Feel free to download the latest release and try it out. For more information on our latest release refer to this blog post.

    the Telerik team

Back to Top