Calling external javascript on node click

2 posts, 0 answers
  1. Richard Priddy
    Richard Priddy avatar
    14 posts
    Member since:
    Apr 2006

    Posted 20 Nov 2008 Link to this post

    Hello,

    I am binding a datatable to my rad tree view and depending on the node's level, get it to call a javascript function when it is click, along with doing the normal post back call.

    Many thanks for help provided.

    Richard

  2. Richard Priddy
    Richard Priddy avatar
    14 posts
    Member since:
    Apr 2006

    Posted 20 Nov 2008 Link to this post

    Hello again,

    Sorry for waisting anyones time, but I have just figured it out, For future referance, or anyone else needing a solution to this:

      if (e.Node.Level == 1)
    e.Node.Attributes.Add("OnClick", "switchTo('account')");
    else if (e.Node.Level == 2)
    e.Node.Attributes.Add("OnClick", "switchTo('contact')");

Back to Top