I haven't done dynamic columns with ADG, but, at least with the standard DataGrid, the.columns property returns a *copy* of the DataGridcolumns array, so it is critical after modifying that array that you re-assign it to the columns property.
ADG is probably the same, adg.groupedColumns returns a *copy* of the column array, so changing it does not change the ADG. Tracy Spratt, Lariat Services, development services available _____ From: [email protected] [mailto:[email protected]] On Behalf Of Joao Coelho Sent: Tuesday, March 31, 2009 4:58 AM To: [email protected] Subject: [flexcoders] Re: Add/remove columns dynamically to AdvancedDataGridColumnGroup Thank you Tracy, Although my grid structure is something along the lines: column1, column2, columngroup( column3, column4), column5 and I wanted to manipulate only the group, what did the trick was indeed setting groupedColumns property on the grid after changing columns. I simply did adg.groupedColumns = adg.groupedColumns and it worked, it never occurred to me that this might work (I find it somewhat dumb actually), but since I have no acces to the source of AdvancedDataGrid I can't tell what is going on with that class. Do you know why setting that property would trigger the change and not when invalidating properties, display list and the likes? --- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com, "Tracy Spratt" <tspr...@...> wrote: > > You should be able to manipulate the columns dynamically. At least with the > standard DataGrid, the.columns property returns a *copy* of the > DataGridcolumns array, so it is critical after modifying that atrray that > you re-assign it to the columns property. > > > > var aDGCTemp:Array = myDataGrid.columns; > > //modify aDGCTemp, adding or removing, etc columns > > myDataGrid.columns = aDGCTemp; //THIS IS REQUIRED > > > > Tracy Spratt, > > Lariat Services, development services available >

