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

Find node by id client-side

3 Answers 90 Views
OrgChart
This is a migrated thread and some comments may be shown as answers.
Cezary
Top achievements
Rank 1
Cezary asked on 31 Mar 2014, 12:09 PM
Welcome,

I want to know how can I find node in orgChart by id on client-side using javascript. I tried get_nodes() method but I don't know how can I get simple node from this collection.

3 Answers, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 03 Apr 2014, 11:58 AM
Hi Cezary,

You can access the needed GroupItem or Node by its index value. Here is an exmaple code demonstrating that:
var orgChart1 = $find("RadOrgchart1");
//gets the first node with index zero
orgChart1 .get_nodes().getNode(0);
//gets the second GroupItem with index 1
orgChart1.get_nodes().getNode(0).get_groupItems().getGroupItem(1);

Regards,
Kate
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Cezary
Top achievements
Rank 1
answered on 04 Apr 2014, 05:50 AM
Is it possible to do sth like this:
I need find node by DataFieldID and get its Hierarchical Index and then run drillDownOnNode method for this node index. Everything I want to do on client-side.
0
Plamen
Telerik team
answered on 08 Apr 2014, 02:59 PM
Hi,

You could use the client side method drillDownOnNode of RadOrgChart and pass the hierarchical index(e.g "0:0:1") of the node that you want to be drilled. The drill down feature is useful in case that you want to observe a particular branch of the hierarchy. 

Regards,
Plamen
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
OrgChart
Asked by
Cezary
Top achievements
Rank 1
Answers by
Kate
Telerik team
Cezary
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or