Thanks for the response, In the end the solution was to manually build the hierarchical structure on the client from the flat array and then set it into the ADG using a HierarchichalData object.
This was further complicated because initially I was setting an empty structure into the ADG and then updating it using data binding when the data was downloaded. This doesnt work! Regardless of what you invalidate or refresh the ADG just won't update, the only option is to reset the dataProvider each time. --- In [email protected], Christophe Jolif <[EMAIL PROTECTED]> wrote: > > Hi, > > If all children that pertain to a given group already share the same parent > (parentKey) that means the group is kind of already here, it is just that it > is not exposed to Flex in manner that please it. > > Indeed HierarchicalData does not work out its hierarchy from parent > relationship (parentKey->key) as you have but from children relationship > (childrenField). > > So you need to expose the relationship that way instead of the other way around. > > Either you have the ability to change your data to expose them that way which > would be the simplest, or you have to find a workaround. Maybe using > groupingObjectFunction on your grouping to return the instance of the parent > (the one pointed by parentKey) would help? (not tested though) > > Hope this helps, > -- > Christophe > http://elixir.ilog.com > > reflexactions wrote: > > I have a flat data array with the field "key" and "parentKey" > > > > I am using a GroupedCollection in a ADG. > > > > I have set the GC groupingField to be "parentKey" > > > > This group everything by parenKey in a simple fashion but there doesnt > > seem to be a way to connect parentKey and key together so that it nests > > the rows correctly. > > > > ie the item with key==1 should have nested children that have > > parentKey==1 > > > > How do I do this? > > > > > > > > > > -- > > Flexcoders Mailing List > > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.com > > Yahoo! Groups Links > > > > > > > > > > > > > -- > Christophe >

