Hello guys,
I'm trying to filter my ADG without success :
I created a GroupingCollection from a flat ArrayCollection.
ADG's dataProvider is GroupingCollection.
First issue : refresh
if I filter the underlaying ArrayCollection, the related
groupingCollection doesn't refresh automatically (bug? feature?)
Actually I menaged to force gc.refresh() with some event( it is
impossible to listen on CollectionEventKind.REFRESH because of
infinite loop ac.refresh => gc.refresh )
Second issue (more important) : openNodes
Ok now that my gc is refreshed, the Tree in the ADG collapses itself
(ok let say that is normal), and I need it to expand all nodes that
were opened before.
I tried to do something like this :
var openNodes : Object = IHierarchicalCollectionView(
myADG.dataProvider ).openNodes;
gc.refresh();
myADG.dataProvider.openNodes = openNodes;
and it doesn't works.
next I tried this :
var openNodes : Object = IHierarchicalCollectionView(
myADG.dataProvider ).openNodes;
for each( var node : Object in openNodes )
{
IHierarchicalCollectionView( myADG.dataProvider.openNode( node )
}
guess what, doesn't work :)
I'm calling myADG.invalidateList() each time too.
I don't know what to do to achieve this simple task, I'm a bit
disappointed because I expected lot more from the brand new
AdvancedDataGrid and this basic functionality actually seems too hard
to implement.
I still hope I'm wrong and someone can show me the correct solution :)
Thank you all,
Adnan