So my final solution to this problem is to copy ArrayCollection and 
ListCollectionView and rebrand those as my own and update the private 
handlePropertyChangeEvents method. Fortunately all interfaces seem to be 
consistently implemented and my ADG behaves likes before. Added this: 
enablePostSortReorder

private function handlePropertyChangeEvents(events:Array):void
{
   var eventItems:Array = events;
        
   if (sort && enablePostSortReorder || filterFunction != null)
        


--- In [email protected], Alex Harui <aha...@...> wrote:
>
> You could implement some sort of a transaction system where changes are 
> queued to temporary places until committed.
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: [email protected] [mailto:[email protected]] On 
> Behalf Of tntomek
> Sent: Friday, October 23, 2009 12:30 PM
> To: [email protected]
> Subject: [flexcoders] Re: Disable sort when values in grid change (on 
> propertyChanged)
> 
> 
> 
> Unfortunately scrolling is pretty important :) so is my only option to reset 
> dataProvider with new sorted collection?
> 
> --- In [email protected]<mailto:flexcoders%40yahoogroups.com>, Alex 
> Harui <aharui@> wrote:
> >
> > Try blocking the collectionEvent. It will have kind = 
> > CollectionEventKind.REFRESH. Note that any scrolling will be incorrect 
> > since it will use the new sort order.
> >
> > Alex Harui
> > Flex SDK Developer
> > Adobe Systems Inc.<http://www.adobe.com/>
> > Blog: http://blogs.adobe.com/aharui
> >
> > From: [email protected]<mailto:flexcoders%40yahoogroups.com> 
> > [mailto:[email protected]<mailto:flexcoders%40yahoogroups.com>] On 
> > Behalf Of tntomek
> > Sent: Thursday, October 22, 2009 5:46 PM
> > To: [email protected]<mailto:flexcoders%40yahoogroups.com>
> > Subject: [flexcoders] Disable sort when values in grid change (on 
> > propertyChanged)
> >
> >
> >
> > I don't want my grid reordering itself on every propertyChanged event that 
> > would cause the sort order to change, can I prevent this somehow?
> >
> > I understand this is default behavior but it's not an option for our 
> > customer, and it is really annoying when the 1000 row grid is re-ordered 
> > every time user changes any values, not to mention slow.
> >
> > I tried returning 0 from sortComparer with no luck, grid still seems to 
> > reorder itself according to original data provider and not the sorted view 
> > when sort() was set.
> >
> > Specifically using AdvancedDataGrid and I'm starting to run out of ideas. 
> > Do I reset the dataprovider every time I decide to change my sort? I'm 
> > already intercepting headerRelease and setting sort explicitly as well as 
> > calling sort from controls outside the grid. How would I get the currently 
> > sorted list from my ArrayCollection, does the baseclass CollectionView have 
> > a current sorted view? Is there really no way to take a snapshot or current 
> > view and set it to current? Is there a way to tell sort() to physically 
> > move the rows instead of maintaining a view?
> >
> > What I found online:
> > http://www.actionscript.org/forums/showthread.php3?t=199554
> > Not an option since grid is sortable, I just want to suppress the updates 
> > AFTER initial sort
> >
>


Reply via email to