Hey Richard- You might want to post this question in a general Flex group, where you'll hopefully find people that are experts at working with DataGrids and other UIComponents.
(I myself don't know the answer). - pamela On Sun, Feb 1, 2009 at 3:17 PM, Richard <[email protected]> wrote: > > So I want to have the tree behavior in an AdvancedDataGrid, and use > item renderers in the top-level (aka summary) rows. Once I've applied > grouping, the data object is much changed. > > Here is the code to add grouping to an ADG: > > var tripCollection : TripSearchMatchCollection = > TripSearchMatchCollection(value); > > var theGroupingCollection : GroupingCollection = new > GroupingCollection(); > theGroupingCollection.grouping = new Grouping(); > theGroupingCollection.grouping.fields = new Array(); > > var newGroupingField : GroupingField = new GroupingField('rideID'); > theGroupingCollection.grouping.fields.push(newGroupingField); > newGroupingField = new GroupingField('memberID'); > theGroupingCollection.grouping.fields.push(newGroupingField); > > theGroupingCollection.source = tripCollection; > Grid.dataProvider = theGroupingCollection; > Grid.validateNow(); > theGroupingCollection.refresh(); > > So I'm grouping on a combination of rideID and memberID. > > Whereas previous to grouping, the item renderer's > > override public function set data(value : Object) : void > > received a single member of the tripCollection as 'value', and I could > cast it to the actual class and access its properties, now I get an > Object that has the original data buried down several levels of > subproperties named children and [0]. > > I assume that the layering is a way to show what grouping field values > are controlling the row, but I cannot find any documentation on how to > get the original object out from the depths. > > Any ideas? > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API For Flash" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-maps-api-for-flash?hl=en -~----------~----~----~----~------~----~------~--~---
