Binding TreeView to Collection

5 posts, 1 answers
  1. Meerkat
    Meerkat avatar
    64 posts
    Member since:
    Feb 2007

    Posted 14 Aug 2008 Link to this post

    Hello again
    Valentin's post gave me a much better insight on how RadTreeView works.
    However, although I tried, I could not work out how to populate a tree using a collection.

    I had hoped that studying
    http://blogs.telerik.com/ValentinStoychev/Posts/08-08-05/How_to_Databind_RadTreeView_in_WPF.aspx?ReturnURL=%2fBlogs.aspx
    would help but it didn't.

    I could not find any decent documentation on the Silverlight RadTreeView. All I could find was documentation for WPF RadTreeView, so if anyone can tell me where to find documentation for the Silverlight version, I would be very grateful.

    It would be extremely helpful if you could give me a working example of how to bind a Silverlight RadTreeView to a Collection/ObservableCollection, preferably with varying branch depths rather than the fixed structure used in Artists, Leagues etc., but anything will do if it means a quicker reply.

    I realise this is a lot to ask and I am not happy about it but I am getting nowhere on my own. I will certainly understand if you feel you have helped enough already.

    Many thanks,
    Pete

  2. Answer
    Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 14 Aug 2008 Link to this post

    Hello Pete,

    we are now working on the documentation. We will have a well shaped documentation till the end of the month.

    For the moment you can check this online example:
    http://www.telerik.com/demos/silverlight/#Examples/TreeView/DataBinding

    The source code is available in the sample application that is downloaded with our controls.

    Let us know if you need any more help.

    Best wishes,
    Valentin.Stoychev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. DevCraft banner
  4. Meerkat
    Meerkat avatar
    64 posts
    Member since:
    Feb 2007

    Posted 14 Aug 2008 Link to this post

    Thank you for that Valentin.

    I don't know how I missed the Databinding example in your test site, but I obviously did. I apologise for wasting your time and will try to look more carefully in future.
     
    Using the example, I have finally got everything to work now.

    Many thanks,

    Pete.
  5. Gili
    Gili avatar
    14 posts
    Member since:
    Jan 2013

    Posted 13 May 2013 Link to this post

    the demo is not working and i am confused i am trying to bind a treeview to object that is build like this :
    observercollection<teacher> tc

    teacher is build like this : 

    name 
    age
     observer collection<students>

    i want to bind the tc observer to the tree 
    like this:

    • teacher name
              *student
              *student
              *student
              *student
    • teacher name
              *student
              *student
              *student
              *student
              .
              .
  6. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 15 May 2013 Link to this post

    Hi Meerkat,

    You are right that this demo is not loading. We changed it a while ago. Please note that the last answer is posted in 2008.

    However, you can find information about the RadTreeView control in our documentation, online demonstration projects and in our XAML GitHub.

    All the best,
    Pavel R. Pavlov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
DevCraft banner