I got the refreshing of the tree part by myself. One needs to call the refresh method on the GroupingCollection2 and HierarchicalCollectionView objects when the arraycollection has just arrived from the database.
But I still havent been able to figure out how to highlight or open a tree node programatically. I am repeating that using (calling / setting) tree.expandItem() and tree.openItems is not helping me. Plz somebody help.
Open things manually and look at what goes in the openItems to make sure you
are programatically using it correctly.
I am doing what u suggested. I open the nodes manually and store the tree.openItems object and when I have refreshed the tree I reassign this object to tree.openItems , still the tree remains unopened. I also tried opening the tree by iterating through this tree.openItems and opening such node of the tree using
tree.expandItem() . Doesnt work.
If you refresh the data, did the UIDs stay the same? That's important.