This is a migrated thread and some comments may be shown as answers.

Binding TreeView to Collection

4 Answers 124 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Meerkat
Top achievements
Rank 1
Meerkat asked on 14 Aug 2008, 10:35 AM

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

4 Answers, 1 is accepted

Sort by
0
Accepted
Valentin.Stoychev
Telerik team
answered on 14 Aug 2008, 12:59 PM
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.
0
Meerkat
Top achievements
Rank 1
answered on 14 Aug 2008, 05:16 PM
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.
0
Gili
Top achievements
Rank 1
answered on 13 May 2013, 06:46 AM
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
          .
          .
0
Pavel R. Pavlov
Telerik team
answered on 15 May 2013, 03:05 PM
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.
Tags
TreeView
Asked by
Meerkat
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
Meerkat
Top achievements
Rank 1
Gili
Top achievements
Rank 1
Pavel R. Pavlov
Telerik team
Share this question
or