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

Binding Child Items to Parent

3 Answers 65 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Shrikant
Top achievements
Rank 1
Shrikant asked on 31 May 2012, 02:26 PM
Hi Telerik Team,

I have a table structure like ParentFolderID & ChildFolderID. The Data looks like below :
106     107
106     118
0         106
107     108
107     109
107     113
106     122
107     115
107     111
Here 0 is the Root for Tree.

Now, in my one of ASP.Net project, we have used Asp.Net Ajax Tree View control.
& I have binded above data using properties like 
 RadTreeView1.DataFieldID = "ChildFolderID"
 RadTreeView1.DataFieldParentID = "ParentFolderID" 
RadTreeView1.DataTextField = "FolderName"
 RadTreeView1.DataValueField = "FolderID"
& This works great.

I found little bit hard with Silverlight TreeView Control to bind such data.

Can you please help me out here, How can I bind data like above table structure in Parent Child format to Silverlight Tree View Control?

Thanks

3 Answers, 1 is accepted

Sort by
0
Shrikant
Top achievements
Rank 1
answered on 01 Jun 2012, 06:43 AM
I found the solution for Above :

This Article helps me : RadTreeView bound to self-referencing table

Thanks
 
0
Accepted
Tina Stancheva
Telerik team
answered on 01 Jun 2012, 08:45 AM
Hello Shrikant,

I am glad that you found a solution. However, please note that this article is a basic sample and if you need to implement an add/remove or drag/drop functionality in the RadTreeView, you'll have to extend the self-referencing data implementation - in this forum thread you can find more information and a sample solution.

Greetings,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Shrikant
Top achievements
Rank 1
answered on 04 Jun 2012, 06:11 AM
Thanks Tina,

I was going to use Drag & Drop in TreeView, Thanks for the attention.
The article don't work for Drag & Drop functionality, Its just for Self Ref. Data Binding.


Thanks Again
Tags
TreeView
Asked by
Shrikant
Top achievements
Rank 1
Answers by
Shrikant
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or