Hi Greg, I forgot that since my approach when I developed my first bead (Sort). Thank you very much.
Greg Dove <greg.d...@gmail.com> escreveu no dia domingo, 21/11/2021 à(s) 23:07: > Hi Hugo, > > It's been a while since I used it, but perhaps you could use ArrayListView > as your dataprovider instead of ArrayList. It has more event-driven > updates, so might just 'work' - something for you to check as an option - > the ArrayListView itself has a refresh method, similar to mx > ArrayCollection. > > I think there is something in Tour-de-Jewel using ArrayListView in one of > the examples. I guess it should work the same for DataGrid... > > > > > On Mon, Nov 22, 2021 at 11:47 AM Hugo Ferreira <hferreira...@gmail.com> > wrote: > > > Hi, > > > > I have a Jewel DataGrid where the user can change the data outside of the > > DataGrid. > > To proper refresh the DataGrid (without timmers or hacks like > dataProvider > > = null), I checked the ArrayList source and tested this simple method > that > > works perfectly: > > dataProvider.dispatchEvent(new Event('collectionChanged')); > > > > So I have created a method inside my DataGrid "refresh": > > > > public function refresh():void > > { > > if (dataProvider != null) > > dataProvider.dispatchEvent(new Event('collectionChanged')); > > } > > > > Of course that this works with Royale ArrayList and was not tested with > mx > > ArrayCollection but I guess that almost all of us use ArrayList for Jewel > > and ArrayCollection for mx emulation. > > > > Since this is a specific approach method (not the bead way) to solve > > this problem I guess that this can't be added to the DataGrid.as Royale > > source code. > > Correct me if I'm wrong. > > > > Regards, > > Hugo. > > >