No problem. Also if you use this 2nd way, when the results are returned you'd have to make sure to call the removeAll method to rest the collection before adding more items to it.
If you prefer binding, Another way would be to bind the getter to an event and dispatch that event when the results are received. Then use the getter in you data grid using curly bracket bindkng. Then when the even is fired the getter would get triggered and the data grid would be updated On Aug 26, 2017 6:42 PM, "Kyle McKnight" <kamck...@gmail.com> wrote: > Or just declare and define your _myresults variable at the same time. > > var _myResults:ArrayCollection = new ArrayCollection(); > > Then instead of creating a new ArrayCollection when the results are > returned, just run through the list of results in a loop and use the > addItem method of the _myResults ArrayCollection to add each item to it > > > Kyle McKnight > Senior UI Engineer - Accesso > 602.515.1444 <(602)%20515-1444> (M) > > On Sat, Aug 26, 2017 at 6:40 PM, Kyle McKnight <kamck...@gmail.com> wrote: > >> There are many ways you could do it. >> >> Try dispatching a custom event, something like "itemCategoriesRecieved," >> from the data manager when the results are returned. In your class that >> contains the data grid, listen for that event on your data manager and set >> the data provider of the grid in the event handler. >> >> >> Kyle McKnight >> Senior UI Engineer - Accesso >> 602.515.1444 <(602)%20515-1444> (M) >> >> On Sat, Aug 26, 2017 at 6:34 PM, Trevor Holman <trev...@mchsi.com> wrote: >> >>> This is what I'm trying to do but I'm not sure how to do this so that >>> the variable is set before I set the dataProvider... >>> >>> -----Original Message----- >>> From: Kyle McKnight [mailto:kamck...@gmail.com] >>> Sent: Saturday, August 26, 2017 11:38 AM >>> To: Flex Users Group >>> Subject: Re: AIR >>> >>> Or you can also just make sure to set it as the data provider after the >>> results are received rather than before. >>> >>> Kyle >>> >>> >>> Kyle McKnight >>> Senior UI Engineer - Accesso >>> 602.515.1444 (M) >>> >>> On Sat, Aug 26, 2017 at 12:35 PM, Kyle McKnight <kamck...@gmail.com> >>> wrote: >>> >>> > Don't set _myResults to a brand new ArrayCollection. >>> > >>> > 1. Instead, insure _myResults exists (maybe create an empty one when >>> > you instantiate your DataManager). >>> > 2. Set _myResults as the data provider on your DataGrid. >>> > 3. When you get your results, use the addItem method on _myResults to >>> > add the items. >>> > >>> > Kyle >>> > >>> > >>> > >>> > >>> > Kyle McKnight >>> > Senior UI Engineer - Accesso >>> > 602.515.1444 <(602)%20515-1444> (M) >>> > >>> > 2017-08-26 12:23 GMT-04:00 <vinc...@after24.net>: >>> > >>> >> Bonjour, >>> >> >>> >> En congés jusqu'au 4 septembre, je prendrais connaissance de votre >>> >> message à mon retour. >>> >> >>> >> Cordialement, >>> >> >>> >> Vincent/AFTER24 >>> >> >>> >> >>> >> >>> >> >>> > >>> >>> >> >