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

Dynamic Binding treeView

5 Answers 164 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
smith
Top achievements
Rank 1
smith asked on 25 Aug 2009, 08:17 AM
HI
  I am using Rad Treeview. My doubt is  i am getting the Data from Wcf Service. once i got the data i will create the  hierarchical list based on the data and  populate in the treeview . It is happened dynamically based on the  return data from service.

if i used Hierarchical Data Template i need to define How many levels my scenario i dont know how manylevels it come , so every thing i need to populate in load view, i dont want load on demand or treeeview expanded evemt.
i am using MVVM model , i dont want to write code like that RadTreeview.Items.add(treeview Item)

Is it possible  for binding . ?
ple drop ur comments if u need more clarification.

5 Answers, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 25 Aug 2009, 08:28 AM
Hi smith,

Please refer to these blog posts. They explain how to work with WCF services and populate various controls with them:

Auto-complete ComboBox with WCF Service and RadControls for Silverlight

Working with WCF Web Services in Silverlight, a headache/solution approach

Populating Silverlight TreeView from WCF Service with LINQ to SQL

Go through them and see how they work for you. After that, if you have more questions, let us know

All the best,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
smith
Top achievements
Rank 1
answered on 25 Aug 2009, 09:48 AM
hi
I  gone through this article . but i need a clarification , if  i have a collection with hierarchical manner , need to bind in Treeview
but     i dont want to use Data Template for this , Is it possible ? Binding the collection directly . 

0
Valentin.Stoychev
Telerik team
answered on 25 Aug 2009, 12:31 PM
Hello smith,

This is not possible, you need the HierarchicalDataTemplate in order to display hierarchical data.

Kind regards,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
smith
Top achievements
Rank 1
answered on 25 Aug 2009, 03:20 PM
HI
Thansks for ur replay . MY scenario is in  my class contains all the Hierarchical order , i am setting the itemsource property as the class.it is showing only Header parts only ,  ineeed to show all the child parameters also , previous examples are showing  only  expanded event doing , also i seen that example if edit is enable then i change the Name using F2 then it is showing the collection name not the property name , how to edit also . can u send me one good example for implementing all functionality ..

regards
smith
0
Valentin.Stoychev
Telerik team
answered on 27 Aug 2009, 08:26 AM
Hello smith,

Are you using self referencing hierarchy? Please check this blog post:

http://blogs.telerik.com/valerihristov/posts/09-08-26/self-reference_hierarchy_with_telerik_treeview_for_silverlight.aspx



Sincerely yours,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
TreeView
Asked by
smith
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
smith
Top achievements
Rank 1
Share this question
or