Hi,
I try to fix this add change event like the following code.but I am
nulucky.the problem still there.Please give a idea how to fix this.
(ModelLocator.QModel is a Arraycollection)
Thanks for your help.
Mark
ps:code
<mx:AdvancedDataGrid x="24" y="70" width="569" height="239"
rowCount="4" initialize="gc1.refresh()" show="gc1.refresh()"
change="gc1.refresh()" >
<mx:dataProvider>
<mx:GroupingCollection id="gc1" source="{ModelLocator.QModel}">
<mx:grouping>
<mx:Grouping>
<mx:GroupingField name="TypeName" />
</mx:Grouping>
</mx:grouping>
</mx:GroupingCollection>
</mx:dataProvider>
<mx:columns>
<mx:AdvancedDataGridColumn headerText="Name" dataField="Name"/>
<mx:AdvancedDataGridColumn headerText="Department"
dataField="Department"/>
</mx:columns>
</mx:AdvancedDataGrid>
--- In [email protected], "Gregor Kiddie" <[EMAIL PROTECTED]> wrote:
>
> Your problem is that the GroupingCollection dataprovider doesn't
> dispatch change events for the underlying collection, so binding doesn't
> work. Either subclass GroupingCollection and dispatch the events
> yourself, or manually create a new GroupingCollection everytime the
> underlying collection changes and reset the ADGs dp.
>
> The bug is http://bugs.adobe.com/jira/browse/FLEXDMV-1334
> <http://bugs.adobe.com/jira/browse/FLEXDMV-1334>
>
> Gk.
>
> Gregor Kiddie
> Senior Developer
> INPS
>
> Tel: 01382 564343
>
> Registered address: The Bread Factory, 1a Broughton Street, London SW8
> 3QJ
>
> Registered Number: 1788577
>
> Registered in the UK
>
> Visit our Internet Web site at www.inps.co.uk
> <blocked::http://www.inps.co.uk/>
>
> The information in this internet email is confidential and is intended
> solely for the addressee. Access, copying or re-use of information in it
> by anyone else is not authorised. Any views or opinions presented are
> solely those of the author and do not necessarily represent those of
> INPS or any of its affiliates. If you are not the intended recipient
> please contact [EMAIL PROTECTED]
>
> ________________________________
>
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of markflex2007
> Sent: 06 May 2008 18:17
> To: [email protected]
> Subject: [flexcoders] AdvancedDataGrid doesn't update with real data?
>
>
>
> Hi,
>
> I am working with cairngorm with Flex 3.
>
> I use Datagrid before in the page and it works fine.The Datagrid
> automatically update when the data updated in database.
>
> ...
> <mx:DataGrid x="15" y="72" width="581.5" height="239"
> dataProvider="{ModelLocator.QModel}">
> <mx:columns>
> <mx:DataGridColumn headerText="Name" dataField="Name"/>
> <mx:DataGridColumn headerText="Department"
> dataField="Department"/>
> </mx:columns>
> </mx:DataGrid>
> ...
>
> I just use AdvancedDataGrid to raplace DataGrid and add grouping
> feature.But it has a problem now.
>
> <mx:AdvancedDataGrid x="15" y="72" width="581.5" height="239"
> rowCount="4" initialize="gc1.refresh();" >
>
> <mx:dataProvider>
> <mx:GroupingCollection id="gc1" source="{ModelLocator.QModel}">
> <mx:grouping>
> <mx:Grouping>
> <mx:GroupingField name="TypeName" />
> </mx:Grouping>
> </mx:grouping>
> </mx:GroupingCollection>
>
> </mx:dataProvider>
>
>
>
> <mx:columns>
> <mx:AdvancedDataGridColumn headerText="Name"
> dataField="Name"/>
> <mx:AdvancedDataGridColumn headerText="Department"
> dataField="Department"/>
>
> </mx:columns>
> </mx:AdvancedDataGrid>
>
> The problem is the AdvancedDataGrid doesn't update even if data
> updated in database when I visit the page again.
>
> Please give me a idea how to fix this.why this happen
>
> Thanks for your help
>
> Mark
>