All nodes inside a RadTreeView showing on first level

0 Answers 32 Views
Styling TreeView
exp
Top achievements
Rank 1
exp asked on 19 May 2022, 11:12 AM | edited on 19 May 2022, 11:33 AM

 

I am trying to populate tree view data but all the nodes get displayed at same root level. Tree view is not showing me the hierarchy. I have attached screenshots as well for aspx , data and ui being displayed for me. Please help me find out what am i doing wrong. I am using telerik ui for asp.net webforms.

 

exp
Top achievements
Rank 1
commented on 19 May 2022, 02:13 PM

Got it resolved ! My bad ! i was doing the binding to datasource first then defining the parent child relations instead of this: 

treeView.DataTextField = "Text";
            treeView.DataFieldID = "ID";
            treeView.DataFieldParentID = "ParentID";
            treeView.DataSource = siteData;
            treeView.DataBind();

No answers yet. Maybe you can help?

Tags
Styling TreeView
Asked by
exp
Top achievements
Rank 1
Share this question
or