Re: [flexcoders] Re: how to fix poor performance in this example (AdvancedDataGrid and Binding)

2009-06-10 Thread Pan Troglodytes
This seems like probably the best option. I suspected that it was something to do with properties changing causing excessive refresh, but the fact that Alex didn't point that out as the problem kind of threw me off track. It appears that the highlight is set in drawItem, so I subclassed ADG and

[flexcoders] Re: how to fix poor performance in this example (AdvancedDataGrid and Binding)

2009-06-10 Thread Amy
--- In flexcoders@yahoogroups.com, Pan Troglodytes chimpathe...@... wrote: 1) Yes, this works fine, for the display portion only. It doesn't address the actual problem of needing to set a flag in the data that indicates it is the currently highlighted one, that flag being also used by other

Re: [flexcoders] Re: how to fix poor performance in this example (AdvancedDataGrid and Binding)

2009-06-10 Thread Pan Troglodytes
Yes, a mushroom indeed - well put! By the way, I found your posts about your fun with the various ADG item renderers quite informative. Though you did leave me wishing for some source code of the working examples. The problem here is that this data serves to link up different parts of the UI.

[flexcoders] Re: how to fix poor performance in this example (AdvancedDataGrid and Binding)

2009-06-10 Thread Amy
--- In flexcoders@yahoogroups.com, Pan Troglodytes chimpathe...@... wrote: Yes, a mushroom indeed - well put! By the way, I found your posts about your fun with the various ADG item renderers quite informative. Though you did leave me wishing for some source code of the working examples.

Re: [flexcoders] Re: how to fix poor performance in this example (AdvancedDataGrid and Binding)

2009-06-10 Thread Pan Troglodytes
I think you missed the part above where I said more than one item could be activated. Some items can be locked on, and it also includes the currently selectedItem (which can be different than the one being moused over). The examples were dumbed down so people could easily figure out where I was

[flexcoders] Re: how to fix poor performance in this example (AdvancedDataGrid and Binding)

2009-06-09 Thread Amy
--- In flexcoders@yahoogroups.com, Pan Troglodytes chimpathe...@... wrote: That was a good idea and it does get rid of the arraycollection walking. But I get the SAME problem with the grid losing highlighting when I did it using AdvancedGridItemRenderer, thought the symptoms are slightly

[flexcoders] Re: how to fix poor performance in this example (AdvancedDataGrid and Binding)

2009-06-09 Thread valdhor
Here is my take on what you are trying to do... Application: ?xml version=1.0 encoding=utf-8? Application xmlns=http://www.adobe.com/2006/mxml; creationComplete=cc() layout=horizontal Script ![CDATA[ import mx.events.ListEvent; import mx.collections.ArrayCollection;

Re: [flexcoders] Re: how to fix poor performance in this example (AdvancedDataGrid and Binding)

2009-06-09 Thread Pan Troglodytes
1) Yes, this works fine, for the display portion only. It doesn't address the actual problem of needing to set a flag in the data that indicates it is the currently highlighted one, that flag being also used by other things that bind to the data that don't want to know about UI details like the

[flexcoders] Re: how to fix poor performance in this example (AdvancedDataGrid and Binding)

2009-06-09 Thread Tim Hoff
Just a thought, but what if you call drawHighlightIndicator manually; after you set the variable? Maybe even callLater. -TH --- In flexcoders@yahoogroups.com, Pan Troglodytes chimpathe...@... wrote: 1) Yes, this works fine, for the display portion only. It doesn't address the actual problem

Re: [flexcoders] Re: how to fix poor performance in this example (AdvancedDataGrid and Binding)

2009-06-09 Thread Paul Williams
When you set the highlighted property on your items, they are dispatching PropertyChangeEvents. The collection they are in will receive these PropertyChangeEvents and dispatch CollectionChangeEvents. The AdvancedDataGrid will receive these and perform a visual update, which appears to clear the

[flexcoders] Re: how to fix poor performance in this example (AdvancedDataGrid and Binding)

2009-06-09 Thread Tim Hoff
Nice Paul, So, extend ADG and add a highlightedItem:MyItemVO property that uses a Bindable highlightedChange event; with the same getter/setter structure as below. Not sure, in MyADG, if you'd set the highlightedItem on itemRollover or initialte from the itemRenderer, with an Event though; just

Re: [flexcoders] Re: how to fix poor performance in this example (AdvancedDataGrid and Binding)

2009-06-08 Thread Pan Troglodytes
That was a good idea and it does get rid of the arraycollection walking. But I get the SAME problem with the grid losing highlighting when I did it using AdvancedGridItemRenderer, thought the symptoms are slightly different: ?xml version=1.0 encoding=utf-8? Application

Re: [flexcoders] Re: how to fix poor performance in this example (AdvancedDataGrid and Binding)

2009-06-08 Thread Pan Troglodytes
Oh yeah, another thing I should point out is that in the real grid, I have multiple columns. As such, a solution that relies on the itemRenderer might be problematic due to gaps between items and such. I would just use the itemRollOver and itemRollOut to do it all, but rollOut doesn't get

[flexcoders] Re: how to fix poor performance in this example (AdvancedDataGrid and Binding)

2009-06-05 Thread Tim Hoff
Hi Jason, Have you tried it from within the itemRenderer? Something like: private var adg : AdvancedDataGrid; override public function set data(value:Object):void { super.data = value; adg = owner as AdvancedDataGrid; } override protected function updateDisplayList( w:Number,