You should check out some of the examples at the ilog exilir page.. i've said 
this before they have some good examples... are you adding a collectionEvent to 
your collection? You should be adding an eventListener so that when your 
collection refreshes you can do everything you need to. You can see if the 
collection has refreshed properly by checking the return value from the refresh 
method

var bool:Boolean = collec.refresh()

--- In flexcoders@yahoogroups.com, "tntomek" <tnto...@...> wrote:
>
> I'm not 100% certain even the main sort works via initial programmatic 
> setting (it does after you click on grid header)
> 
> This is the class in question. If you are making your grouping collection via 
> code you must be using this already.
> 
> frameworks\projects\datavisualisation\src\mx\collections\GroupingCollection.as
> 
> Follow the code in 
> public function refresh(async:Boolean = false):Boolean
> 
> It eventually gets to:
> private function makeGroupedCollection():Boolean
> 
> then buildGroups
> 
> ... have fun :) it takes a WHILE to absorb all this.
> 
> See if u can find your sort actually being used, note that to create a group 
> Flex internally sets your collection to another sort (grouping one), it then 
> just sets yours back without actually having sorted it (95% sure about last 
> statement).
> 
> --- In flexcoders@yahoogroups.com, Tom McNeer <tmcneer@> wrote:
> >
> > Hi Tom,
> > 
> > Thanks for the reply.
> > 
> > On Wed, Apr 21, 2010 at 10:18 AM, tntomek <tntomek@> wrote:
> > 
> > >  the part where it actually creates the subgrouped nodes (or leaf nodes),
> > > you will notice sort is not used on those sub array collections.
> > >
> > 
> > Actually, though, my sort is breaking down earlier - on the main nodes of
> > the group. It's the absolute top level of grouping where the sort is being
> > ignored.
> > 
> > Any thoughts about that?
> > 
> > 
> > > GC is a really worthwhile class to understand if you are dealing with
> > > hierarchical data, it's overwhelming at first but stick to it. You might
> > > have to tweak it a bit to force it to sort the sub collections.
> > >
> > >
> > > I'm using quite large groups at times and actually took GC2 from Flex 4. 
> > > So
> > > far so good, there is nothing Flex 4 specific about that class.
> > >
> > So using that class creates correct sorting?
> > 
> > As I say, the part that I don't understand is why the main groups aren't
> > sorted correctly. Similar sorts have worked for me in other ADGs.
> > 
> > -- 
> > Thanks,
> > 
> > Tom
> > 
> > Tom McNeer
> > MediumCool
> > http://www.mediumcool.com
> > 1735 Johnson Road NE
> > Atlanta, GA 30306
> > 404.589.0560
> >
>


Reply via email to