Loading ...
Sorry, an error occurred while loading the content.
 

Re: [ydn-javascript] TreeView - Focus a Node via getNodeByProperty

Expand Messages
  • Satyam
    Once you have the node with getNodeByProperty you could go to the parent and call the expand() method on it and keep going until there is no parent (the root).
    Message 1 of 2 , Oct 10, 2008
      Once you have the node with getNodeByProperty you could go to the parent
      and call the expand() method on it and keep going until there is no
      parent (the root). In 2.6 you can call the node focus() method.

      var node = tree.getNodeByProperty( ...,...);
      for (var n = node.parent;n;n = n.parent) {
      n.expand();
      }
      node.focus();

      Satyam


      lance_riedel wrote:
      > I am trying to find a way to select a node in a tree via
      > getNodeByProperty, then have all parent nodes opened, and the node
      > placed in focused.
      >
      > This is functionality that some maybe familiar with in Eclipse called
      > "Link With Editor". Basically I have content that I want to sync with
      > a table of contents. I have the Node, but not sure what to do with it
      > next.
      >
      > Thanks!
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
      > ------------------------------------------------------------------------
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG - http://www.avg.com
      > Version: 8.0.173 / Virus Database: 270.7.6/1716 - Release Date: 09/10/2008 9:44
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.