4 Replies Latest reply on Dec 19, 2007 4:01 PM by 187_2007

    tree append

      I have a <mx:tree> tag that works fine. It has children under it's parents etc... I've used the (itemOpen) event of the tree to tell me that the Arrow beside the parent has been clicked.. But what is the function that will tell me what the parent's name is when I click the arrow? In other words, how do I know which arrow the user clicked so I can retrieve the proper information per that node?
        • 1. tree append
          Hi. I assume you are using the TreeEvent. I am doing some similar with the Advanced Data Grid. I have something like this:

          private function addChildXML(evt:AdvancedDataGridEvent):void {
          var containsPKID:Boolean = alreadyOpenedAC.contains(evt.item.@PKID.toString()); //using the PKID sent in the itemOpen event.

          (do or don't do stuff)


          (I left out the other stuff. In the above example I am looking into an arraycollection to see if the PKID already exists. If it does, I skip doing other stuff.

          I use the @ sign as I am working with XML

          Hope that works for you.
          • 2. Re: tree append
            187_2007 Level 1
            I'm using the itemOpen feature in the MX:tree tag. So what do you send to the function addChildXML? in other woeds I imagine you have something like this in your <mx:tree> tag <mx:tree itemOpen
            "addChildXML(something)"> What is that (something)? is it TreeEvent?
            • 3. tree append
              binkerboy Level 1
              Sorry, I am new to this FLEX, but quickly growing to like it.

              In the AdvDataGrid I put:


              Just like that. (your function name). I think the Tree control works the same way.
              • 4. Re: tree append
                187_2007 Level 1
                yeah, I tried sending (event) but it fails on that... It sounds logical to me also. I'll keep trying stuff and seeing what I come up with.