1 Reply Latest reply on Apr 29, 2008 11:48 PM by LittleMuscle

    Tree Control: getting the folder a selectedItem is in

      Is this possible? i can get the selectedItem(s) with: myTree.selectedItems[ i ].@label but can i get the folder the selected item is in?

      to populate myTree, i used xml like this :
      <dept label='a'>
      <report label='rep1'/>
      <report label='rep2'/>
      <dept label='b'>
      <report label='rep3'/>
      <report label='rep4'/>

      so for instance, i can select "rep4" and get it's value but i am wondering if i can also get "b" (in ref. to <dept label='b'>) when i select "rep4".

      here is my tree control creation, just in case: <mx:Tree id="myTree" dataProvider="{DNR_XML}" labelField="@label" showRoot="false" allowMultipleSelection="true" />