0 Replies Latest reply on Sep 18, 2008 4:13 PM by VNair

           Grouping collection refresh issue when the underlying dataProvider data changes 

    VNair
      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
      Vimal

      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>