0 Replies Latest reply on Jan 3, 2011 1:00 AM by Joker_82

    Tree Implementation - Like a file system


      Hi all,


      I'm want to implement something that will look similar to Windows's file explorer - it should have a tree on the left side and a table (datagrid) on the right side. The tree displays some hierarchy, let's say folders, and upon selection on a folder in the tree, the right side displays the files inside it. Important to say that the tree doesn't show leafs (files), just like in the file explorer in Windows.


      The entire hierarchy is supplied as an XML to my flex application.


      My XML structure will look something like this:

      <FOLDER label="folder1" id="folder1_id" >
          <FILE label="FILE1.1" id="FILE11_id" />
          <FILE label="FILE1.2" id="FILE12_id" />
      <FOLDER label="folder2" id="folder2_id" >
          <FILE label="FILE2.1" id="FILE21_id" />
          <FILE label="FILE2.2" id="FILE22_id" />


      How can I hide the leafs (the "File" tags) in the tree but show them on the table when clicking on the parent folder? How can I "slice" the XML and supply the children (and only them) to the table (datagrid)?