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

Is there a method to union 2 nodes in tree view?

1 Answer 73 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Barani
Top achievements
Rank 1
Barani asked on 08 Jan 2013, 12:06 AM

Hi,

I have 3 different object / node as below, and I am trying to form the finalObj / node which is the union (unique tree list) of the 3 nodes..

Is there a method in tree view with which I can union 3 objects (nodes)  based on text or id ?

First node: 
[ { text: "TreeRoot", items: [ { text: "Subgroup1" }, { text: "Subgroup2" } ]}] Second Node: var obj2= [ { text: "TreeRoot", items: [ { text: "Subgroup3" } ]}] Third node: var obj3= [{ text: "Subgroup3", items: [ { text: "subgroup5", items: [ { text: "subgroup6", items: [ { text: "subgroup7", items: [ { text: "subgroup8" }] }] }] }]}]
Final expected node:
var finalObj= [ { text: "TreeRoot", items: [ { text: "Subgroup1" }, { text: "Subgroup2" }, { text: "Subgroup3", items: [ { text: "subgroup5", items: [ { text: "subgroup6", items: [ { text: "subgroup7", items: [ { text: "subgroup8" }] }] }] }]}]}]

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 09 Jan 2013, 12:15 PM
Hello,

 It seems your related stackoverflow question was answered.

Kind regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
TreeView
Asked by
Barani
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or