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

Updating description in TreeView on the fly

Expand Messages
  • suchanek_tomasz
    I m newbie and not similar with java script so maybe my question is stupid but I want to change in TreeView, which already is generated label(description) and
    Message 1 of 3 , Jan 31, 2007
    View Source
    • 0 Attachment
      I'm newbie and not similar with java script so maybe my question is
      stupid but I want to change in TreeView, which already is generated
      label(description) and Ive no idea how to do this properly.
      I tried:
      var updNode = tree.getNodeByroperty('rgt',"3");
      updNode.desc = "updated label";
      tree.draw();
      but without effect :(
    • Eric Miraglia
      suchanek_tomasz, Assuming that you have successfully gotten a reference to your node, this will work in the simplest case: mNode.label = new label ;
      Message 2 of 3 , Jan 31, 2007
      View Source
      • 0 Attachment
        suchanek_tomasz,

        Assuming that you have successfully gotten a reference to your node, this will work in the simplest case:

        mNode.label = "new label";
        tree.draw();

        Regards,
        Eric


        ______________________________________________
        Eric Miraglia
        Yahoo! User Interface Library



        On Jan 31, 2007, at 2:37 AM, suchanek_tomasz wrote:

        I'm newbie and not similar with java script so maybe my question is
        stupid but I want to change in TreeView, which already is generated
        label(description) and Ive no idea how to do this properly.
        I tried:
        var updNode = tree.getNodeByroperty('rgt',"3");
        updNode.desc = "updated label";
        tree.draw();
        but without effect :(


      • suchanek_tomasz
        As usually that was my FAULT :) var nodeTextUpdate = function(lft, nodeName, nodeDesc) { var updNode = tree.getNodeByProperty( lft ,lft); updNode.label =
        Message 3 of 3 , Feb 1, 2007
        View Source
        • 0 Attachment
          As usually that was my FAULT :)
          var nodeTextUpdate = function(lft, nodeName, nodeDesc) {
          var updNode = tree.getNodeByProperty("lft",lft);
          updNode.label = nodeDesc;
          updNode.desc = nodeDesc;
          updNode.name = nodeName;
          tree.draw();
          };
        Your message has been successfully submitted and would be delivered to recipients shortly.