4 Replies Latest reply on May 16, 2008 11:49 AM by Quester99

    Invisible Tree Nodes

      Is there a way to make certain tree nodes (leaf / item) invisible? There are certain XML items in the XMLList behind the Flex tree I do not want to show up in the actual Flex tree. How would I do this?
        • 1. Re: Invisible Tree Nodes
          ntsiii Level 3
          Two ways:
          1) preprocess the dataProvider to remove the unwanted nodes. This is probably the easiest. Brain-dead easy if it is a single level XMLList. Recursive processing is harder.

          2) Create a custom TreeItemDataDescriptor. I have not done this but you will find info in the docs.

          • 2. Re: Invisible Tree Nodes
            Level 1
            Thank you but neither of those ways work. I do not want remove nodes from the XML the tree uses. I just want to have certain nodes not show up in the tree.

            I can do this using filterFunction but filterFunction only works on the root level.
            • 3. Invisible Tree Nodes
              ntsiii Level 3
              You did not look closely enough at TreeItemDataDescriptor.

              And preprocessing the xml manually will work if you can't solve the filter issue. You can keep a copy or the unmodified xml if you need it.

              • 4. Re: Invisible Tree Nodes
                Level 1
                When say TreeItemDataDescriptor you mean ITreeDataDescriptor right?

                There is no TreeItemDataDescriptor class or interface that I can find in ActionScript 3.

                Back to the original problem, have can you do this with a custom ITreeDataDescriptor? I wrote my own and was successful as modifying the XML but I had the same problem the only way I could get a tree node not to show up in the tree was delete the XML node and that is not what I want.