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

radTreeview and ObjectDataSource

1 Answer 82 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
MC
Top achievements
Rank 1
MC asked on 25 Feb 2009, 10:37 AM

I tried to follow the instructions in this turotial: http://www.telerik.com/help/aspnet/treeview/tree_usedatabindings.html. the structure of my table is equal, but  all I get is a single level list not  a hierarchy as expected.

 

siteData.Add(

New SiteDataItem(1, Nothing, "All Sites", ""))

 

 

siteData.Add(

New SiteDataItem(2, 1, "Search Engines", ""))

 

 

siteData.Add(

New SiteDataItem(3, 1, "News Sites", ""))

 

 

siteData.Add(

New SiteDataItem(1, 2, "Yahoo", "http://www.yahoo.com"))

 

 

siteData.Add(

New SiteDataItem(2, 2, "MSN", "http://www.msn.com"))

 

 

siteData.Add(

New SiteDataItem(3, 2, "Google", "http://www.google.com"))

 

 

siteData.Add(

New SiteDataItem(4, 3, "CNN", "http://www.cnn.com"))

 

 

siteData.Add(

New SiteDataItem(5, 3, "BBC", "http://www.bbc.co.uk"))

 

 

siteData.Add(

New SiteDataItem(6, 3, "FOX", "http://www.foxnews.com"))

 

 

RadTreeView1.DataTextField =

"Text"

 

 

 

RadTreeView1.DataNavigateUrlField = "Url"

 

 

 

RadTreeView1.DataValueField = "ID"

 

 

 

RadTreeView1.DataFieldID = "ID"

 

 

 

RadTreeView1.DataFieldParentID =

"ParentID"

 

 

 

RadTreeView1.DataSource = siteData

 

RadTreeView1.DataBind()

 

Version of the RadTreeView.Net2.dll  is 6.3.7.0

Any ideas?

Thanks,
 
Mary

1 Answer, 1 is accepted

Sort by
0
MC
Top achievements
Rank 1
answered on 03 Mar 2009, 02:08 PM
Solution I was using the RadTreeView for ASP.Net  and to associate objects it is necessary to use the RadTreeView for ASP.NET Ajax
Tags
TreeView
Asked by
MC
Top achievements
Rank 1
Answers by
MC
Top achievements
Rank 1
Share this question
or