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

Hiearchial Treeview not accepting ParentId as negative or high value

1 Answer 59 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Sekar
Top achievements
Rank 1
Sekar asked on 29 Mar 2010, 08:29 PM
Hi there
   I got a wired issue in binding the Telerik RadTreeView with hierarchial data. The collection is having lets say (Id, ParentId, and Text) properties. When i bind it to the treeview it is not working. The collection looks like this

ID |  ParentID | name
-1   -2              "root"
50   -1             "node1"
like wise..  - This is not working as the ParentID is a negative integer.

I also tried with manipulating the Ids so that just the root having the highest positive number and all other can have positive parent
ID |  ParentID | name
0   35565        "root"
50   0             "node1"
likewise - In this case, except the root all other child nodes are rendering.

Tell me, in the case of having object collection (which i cannot modify) containing ParentId as negative numbers - how do i bind this to treeview ? It this a bug

1 Answer, 1 is accepted

Sort by
0
Dimitar Milushev
Telerik team
answered on 30 Mar 2010, 12:28 PM
Hi Sekar,

Manipulating the IDs before binding the TreeView is the proper approach in this scenario and the only thing you need to do is set the ParentID of the Root to 'Null' instead of 35565.

Kind regards,
Dimitar Milushev
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
Sekar
Top achievements
Rank 1
Answers by
Dimitar Milushev
Telerik team
Share this question
or