Hi,
I have a table with three fields. These fields are id, Description and ParentId. You can find example data below.
ID Description ParentId
1 Desc1 null
2 Desc2 null
3 Desc3 1
4 Desc4 2
5 Desc5 4
Desc1
Desc3
Desc2
Desc4
Desc5
How can I bind this table automatically to the treeview?
Thank you...
5 Answers, 1 is accepted
0
Hello sn,
It is best to use RIAServices to get the data from your database.
Once you turn that data into a flat self-referencing collection, you can use the approach, described in this blog post to define the hierarchy and display it in a RadTreeView.
Please give it a try and let us know if you have any difficulties.
Greetings,
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.
It is best to use RIAServices to get the data from your database.
Once you turn that data into a flat self-referencing collection, you can use the approach, described in this blog post to define the hierarchy and display it in a RadTreeView.
Please give it a try and let us know if you have any difficulties.
Greetings,
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.
0
Trude
Top achievements
Rank 2
answered on 29 Apr 2010, 09:50 AM
The blog mentions that the asp.net version of treeview can automatically bind itself to self-referencing data.
Are there any plans to implement this in the SL version?
0
Hello Jorn,
We plan to release PowerTools in the near future where such working prototype will be included. However, I cannot bind to a specific date for now.
Sincerely yours,
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.
We plan to release PowerTools in the near future where such working prototype will be included. However, I cannot bind to a specific date for now.
Sincerely yours,
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.
0
Selvakumar Savarimuthu
Top achievements
Rank 1
answered on 16 Nov 2010, 11:23 AM
Hi Tina,
Could you also please help me to achieve drag and drop with self-referencing hierarchy in silverlight 3?
Thanks,
Prasanna R
Could you also please help me to achieve drag and drop with self-referencing hierarchy in silverlight 3?
Thanks,
Prasanna R
0
Hi Prasanna R,
I prepared a sample project illustrating how to implement drag and drop in a RadTreeView populated with a self-referencing flat data collection in Silverlight 3.
Have a look at it and let me know if it works for you.
On a side note, I just like to let you know that with our Q3 2010 release, we discontinued our support for RadControls for Silverlight 3 as announced earlier this year (link). With this said, l would like to remind you that any further developments or fixes will be not possible in RadControls for Silverlight 3. You can use our SL 3 controls in your project but we would be able to assist you in your development only with workarounds (when possible) and not with built-in functionality or bugfixes.
Best wishes,
Tina Stancheva
the Telerik team
I prepared a sample project illustrating how to implement drag and drop in a RadTreeView populated with a self-referencing flat data collection in Silverlight 3.
Have a look at it and let me know if it works for you.
On a side note, I just like to let you know that with our Q3 2010 release, we discontinued our support for RadControls for Silverlight 3 as announced earlier this year (link). With this said, l would like to remind you that any further developments or fixes will be not possible in RadControls for Silverlight 3. You can use our SL 3 controls in your project but we would be able to assist you in your development only with workarounds (when possible) and not with built-in functionality or bugfixes.
Best wishes,
Tina Stancheva
the Telerik team
See What's New in RadControls for Silverlight in Q3 2010 on Tuesday, November 16, 2010 11:00 AM - 12:00 PM EST or 10:00 PM - 11:00 PM EST: Register here>>