Find node by id client-side

4 posts, 0 answers
  1. Cezary
    Cezary avatar
    13 posts
    Member since:
    Jan 2011

    Posted 31 Mar 2014 Link to this post

    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.
  2. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 03 Apr 2014 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Cezary
    Cezary avatar
    13 posts
    Member since:
    Jan 2011

    Posted 04 Apr 2014 Link to this post

    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.
  5. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 08 Apr 2014 Link to this post

    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.

     
Back to Top