You have to extent GroupingCollection . It's a bug

package {


        import flash.events.Event;

        import mx.collections.*;
        import mx.events.CollectionEvent;
        import mx.events.CollectionEventKind;

        public class ModifiedHierarcihcalData extends GroupingCollection
        {
                public function ModifiedHierarcihcalData()
                {
                }


        override public function set source(value: Object): void
        {
                 super.source = value;
                 this.refresh();
    }

  }

and use as in this example

<mx:AdvancedDataGrid id="adg"  groupLabelFunction="grpFunc"
visible="true"
                          headerHeight="40"
                                        lockedColumnCount="0" 
horizontalScrollPolicy="on"
verticalScrollPolicy="on"
                                        sortExpertMode="false" width="100%" 
height="100%"
creationComplete="dgrefresh();callLater(expandFirstNode);"  >
                                        <mx:dataProvider>
                                          <extns:ModifiedHierarcihcalData 
id="gc"  >
                                                        <mx:Grouping>
                                                                
<mx:GroupingField
name="{viewSelection.selectedItem.data}">
                                                                        
<mx:SummaryRow summaryPlacement="group">
                                                                                
<mx:fields>
                                                                                
        <mx:SummaryField
dataField="{viewSelection.selectedItem.data}" operation= "COUNT"
label="summary"/>
                                                                                
</mx:fields>
                                                                        
</mx:SummaryRow>
                                                                
</mx:GroupingField>
                                                        </mx:Grouping>
                                                
</extns:ModifiedHierarcihcalData>
                                        </mx:dataProvider>

On Nov 10, 12:38 am, "Kameshwaran.Anandan"
<[email protected]> wrote:
> Hi,
>
> I do have the similar issue,can you please post the solution.
>
>
>
>
>
> VN-3 wrote:
>
> > I found the solution.
>
> > Tx
>
> > On Sep 18, 2:14 pm, VN <[email protected]> wrote:
> >> Hi All,
>
> >> I have an advanced data grid with  grouping collection. The grouping
> >> collection doesn't refresh when underlying dataprovider changes.
>
> >> It works fine, If I don't use grouping. Any solution?
>
> >> Thanks
> >> VN
>
> >> my data source is {model.gatetransaction}
>
> >> <mx:AdvancedDataGrid id="adg"  groupLabelFunction="grpFunc"
> >> visible="false"
> >>                  headerHeight="40"
> >>                  lockedColumnCount="0"
> >>                  horizontalScrollPolicy="on"
> >>                  verticalScrollPolicy="on"
> >>                  sortExpertMode="false"
> >>                  width="100%" height="100%"  >
> >> <mx:dataProvider>
> >>         <mx:GroupingCollection id="gc" source="{model.gatetransaction}">
> >>                 <mx:Grouping>
> >>                 <mx:GroupingField
> >> name="{viewSelection.selectedItem.data}">
> >>                 <mx:SummaryRow summaryPlacement="group">
> >>                 <mx:fields>
> >>                 <mx:SummaryField
> >> dataField="{viewSelection.selectedItem.data}"
> >> operation= "COUNT" label="summary"/>
> >>                 </mx:fields>
> >>                 </mx:SummaryRow>
> >>                 </mx:GroupingField>
> >>                 </mx:Grouping>
> >>                 </mx:GroupingCollection>
> >> </mx:dataProvider>
>
> >> <mx:columns>
> >> <mx:AdvancedDataGridColumn
> >> headerText="{resourceManager.getString('GateFindTool','task')}"
> >> dataField="wtaskid" />
> >> <mx:AdvancedDataGridColumn
> >> headerText="{resourceManager.getString('GateFindTool','created')}"
> >> dataField="created" labelFunction="dformatCreated"  />
> >> <mx:AdvancedDataGridColumn
> >> headerText="{resourceManager.getString('GateFindTool','tran')}"
> >> dataField="shortnbr" />
> >> <mx:AdvancedDataGridColumn
> >> headerText="{resourceManager.getString('GateFindTool','status')}"
> >> dataField="transtatus" />
> >> <mx:AdvancedDataGridColumn
> >> headerText="{resourceManager.getString('GateFindTool','autoGated')}"
> >> headerWordWrap="true" dataField="autooutgated"
> >> labelFunction="dformatAutoGated" />
> >> <mx:AdvancedDataGridColumn
> >> headerText="{resourceManager.getString('GateFindTool','truckLicense')}"
> >> headerWordWrap="true" dataField="vclid" />
> >> <mx:AdvancedDataGridColumn
> >> headerText="{resourceManager.getString('GateFindTool','truckRFID')}"
> >> headerWordWrap="true" dataField="truckrfid" />
> >> <mx:AdvancedDataGridColumn
> >> headerText="{resourceManager.getString('GateFindTool','autoTran')}"
> >> headerWordWrap="true" dataField="autooutgated" />
> >> <mx:AdvancedDataGridColumn
> >> headerText="{resourceManager.getString('GateFindTool','container')}"
> >> dataField="ctrnbr" />
> >> <mx:AdvancedDataGridColumn
> >> headerText="{resourceManager.getString('GateFindTool','chassis')}"
> >> dataField="chsnbr" />
> >> </mx:columns>
> >> </mx:AdvancedDataGrid>
>
> --
> View this message in 
> context:http://old.nabble.com/-flex_india%3A14178--Grouping-collection-refres...
> Sent from the Flex India mailing list archive at Nabble.com.- Hide quoted 
> text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" 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/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to