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

Add Child in Self-reference radtreeview

1 Answer 43 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Vincent
Top achievements
Rank 1
Vincent asked on 27 Jun 2011, 05:44 AM
Hi Telerik! Good Day!

I was able to successfully bind from the database to the radtreeview. What I did is, the data being retrieved in the database is added in an itemcollection. Then, I let treeview.datacontext = itemcollection, and it was successful. The problem now is when I add a data in treeitemcollection. If a parent item in treeview has initially no child, then the data will be added under that parent, but if the parent item in the treeview has already a child, then, the child is not reflected in the treeview. But, if we check the itemcollection, it is really added. I hope you can respond on this! Thanks!

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 29 Jun 2011, 03:52 PM
Hello Vincent,

I am not sure how you add an item to the collection but I attached a sample project where the RadTreeView controls is used to display self-referencing hierarchy and a RadContextMenu is added to each item that allows adding new items or deleting a node from the RadTreeView Items collection.

Please have a look at it and let me know if it helps or if I am missing something.

Best wishes,
Tina Stancheva
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
Tags
TreeView
Asked by
Vincent
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or