jquery for click

2 posts, 0 answers
  1. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 05 Jul 2012 Link to this post

    Hi,

    How would I go about using jquery to add a click event to an orgchart?  I want to be able to click on a person then display that person in a popup window so would need the ID.

    Am I better adding a click event from teh code behind or is it easy to do with jquery - examples much appreciated!

    Regards,

    Jon
  2. Plamen
    Admin
    Plamen avatar
    2731 posts

    Posted 09 Jul 2012 Link to this post

    Hi Jon,

     
    Here is one way to achieve such functionality by using jQuery and the _extractNodeFromDomElement function of RadOrgChart:

    function pageLoad() {
     
                  $telerik.$(".rocGroup").click(function myfunction(e) {
                      var orgChart = $find("<%= RadOrgChart1.ClientID %>");
                      var hierarchicalIndex = orgChart._extractNodeFromDomElement(e.target)._getHierarchicalIndex();
                      alert(hierarchicalIndex);
                  })
              }

    Hope this will be helpful.

    Regards,
    Plamen Zdravkov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top