--- In [email protected], "Abu Hamdan" <[EMAIL PROTECTED]> wrote: > > I am having this issue, i have a query that returns some data, it has some > IDs that are unique between all the data returned. I am trying to do > grouping based on those IDs. but id doesnt seem to work. Copy of th code is > below. > > <mx:AdvancedDataGrid id="myADG" width="600" height="300"> > <mx:dataProvider> > <mx:GroupingCollection id="test" source="{ReportQueryArr}"> > <mx:grouping> > <mx:Grouping> > <mx:GroupingField name="status_id"/> > > </mx:Grouping> > </mx:grouping> > </mx:GroupingCollection> > </mx:dataProvider> > <mx:columns> > <mx:AdvancedDataGridColumn dataField="status_id" > headerText="os_id"/> > <mx:AdvancedDataGridColumn dataField="Location" > headerText="Location"/> > <mx:AdvancedDataGridColumn dataField="customer_id" > headerText="customer_id"/> > <mx:AdvancedDataGridColumn > dataField="server_admin_id_primary" headerText="server_admin_id_primary"/> > <mx:AdvancedDataGridColumn > dataField="server_admin_id_secondary" > headerText="server_admin_id_secondary"/> > </mx:columns> > > </mx:AdvancedDataGrid> > > if i remove the grouping code and just have columns then it shows the data > with the columns but as soon as the grouping goes in it breaks, Is there > any pre-req or unwritten rule for Advanced Data grids or data requirements.
It's actually written: http://livedocs.adobe.com/flex/3/html/help.html? content=advdatagrid_08.html Look at the subtopic in there called Calling the GroupingCollection.refresh() method The GroupingCollection.refresh() method applies the settings of the GroupingCollection class to the data. You must call this method any time you modify the GroupingCollection class, such as by setting the grouping, source, or summaries properties of the GroupingCollection class. You also call the GroupingCollection.refresh() method when you modify a GroupingField of the GroupingCollection class, such as by changing the caseInsensitive, compareFunction, or groupingFunction properties. Notice that in the previous example, the AdvancedDataGrid control calls the GroupingCollection.refresh() method in response to the initialize event of the AdvancedDataGrid control. HTH; Amy

