4 Replies Latest reply on Mar 31, 2011 11:32 PM by Flex harUI

    selecting/highlighting a node in Flex Tree using HierarchicalCollectionView as DataProvider

    DushyantG

      Hi,

      I am using GroupingCollection2 as the dataprovider for HierarchicalCollectionView. The GroupingCollection2 takes its data from an ArrayCollection. And finally I have a Tree whose dataprovider is the HierarchicalCollectionView . I want to acheive 2 things:

       

      1) I want to programatically select/highlight a node in this tree. Using expandItem and passing the Object from the arraycollection is not working.

       

      2) Refresh the tree if there is a change in the arrayCollection.

       

      For the second task, I have a Java Layer that gives me the ArrayCollection  (dp for GroupingCollection2) when I fire a CairngormEvent. But the problem is that every node in the tree is duplicated. I can clearly see that say there are 8 items in the array collection but still the tree shows 16 items ( Each item duplicated as the node in the tree.)

       

      I have been trying to figure this out for many days now without any luck. Any sort of suggestion would be appreciated.

      Thank u in advance.