As I said, it also happens if you scroll. My original app is actually calling an HTTP Service, and I am having the same problem.
--- In flexcoders@yahoogroups.com, "Tim Hoff" <[EMAIL PROTECTED]> wrote: > > I was wondering how long it would take for someone to notice the > querky sort behaviour. The example also acts strange when the > StartDate column is sorted. However, when data comes from a > backend, instead of hardcoded in the app, these types of problems > don't seem to occur. > > -TH > > --- In flexcoders@yahoogroups.com, "Oscar" <oscar_cortes@> wrote: > > > > Are you sure that is working OK? I had seen the example before, > > try sorting by the last column. I has the same problem ... > > > > --- In flexcoders@yahoogroups.com, "Oriol Gual" <oriol.gual@> > > wrote: > > > > > > Hi, > > > I've found this > > > > > > example<http://www.iepl.net/DataGridItemRendererSample/DataGridItemRe > n > > dererSample.html>(source > > > view <http://www.iepl.net/DataGridItemRendererSample/srcview/>, > see > > > AccountBalanceItemRenderer.as) thanks to a prior post and it's > > working ok. I > > > suppose there's a typo in your code, if not, maybe you should > put > > the > > > overridden function inside your class. > > > > > > Hope it helps, > > > Oriol. > > > > > > 2006/8/18, Oriol Gual <oriol.gual@>: > > > > > > > > I'm having the same problem, with a different approach but the > > result is > > > > the same. Any one can help? > > > > > > > > Thanks, > > > > > > > > Oriol. > > > > > > > > 2006/8/18, Oscar < ocortess@>: > > > > > > > > > > > > > > I have a datagrid with an itemRenderer in one of the > columns. > > The > > > > > text in that column turns red if a condition is met. The > example > > > > > below shows what I mean. However, if you scroll the datagrid > or > > > > > resize the screen so that the DG needs to be redrawn, the > > > > > itemRenderer applies the setStyle to the rows that now are > > where the > > > > > original row was. If you keep scrolling the DG down and up, > all > > the > > > > > rows end up with the style applied to them, wheter or not > they > > meet > > > > > the criteris in the Itemrenderer. Is this a bug? or am I > missing > > > > > something here? > > > > > > > > > > --------------- > > > > > <?xml version="1.0" encoding="utf-8"?> > > > > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > > > > > layout="absolute"> > > > > > <mx:Script> > > > > > <![CDATA[ > > > > > [Bindable] > > > > > public var myArray:Array = > [{a:10,b:15, > > c: 21}, > > > > > {a:5,b:1,c: 4},{a:10,b:15, c: 21}, > > > > > {a:10,b:15, c: 2},{a:10,b:15, c: 2}, > > > > > {a:10,b:15, c: 2}, > > > > > {a:10,b:15, c: 2},{a:10,b:15, c: 2}, > > > > > {a:10,b:15, c: 2}, > > > > > {a:10,b:15, c: 2},{a:10,b:15, c: 2}, > > > > > {a:10,b:15, c: 2}, > > > > > {a:10,b:15, c: 2},{a:10,b:15, c: 2}, > > > > > {a:10,b:15, c: 2} > > > > > ]; > > > > > > > > > > ]]> > > > > > </mx:Script> > > > > > > > > > > <mx:DataGrid dataProvider="{myArray}"> > > > > > <mx:columns> > > > > > <mx:DataGridColumn headerText="A" > > > > > dataField="a"/> > > > > > <mx:DataGridColumn headerText="B" > > > > > dataField="b"/> > > > > > <mx:DataGridColumn headerText="C" > > > > > dataField="c" itemRenderer="myRenderer"/> > > > > > > > > > > </mx:columns> > > > > > </mx:DataGrid> > > > > > </mx:Application> > > > > > > > > > > > > > > > --------------- > > > > > > > > > > <--myRenderer.as-- > > > > > > > > > > > // ActionScript file > > > > > package { > > > > > import mx.controls.Text; > > > > > > > > > > public class myRenderer extends Text > > > > > { > > > > > public function myRenderer() { > > > > > > > > > > } > > > > > override public function set data (value:Object):void > { > > > > > super.data = value; > > > > > > > > > > if (Number(this.text) > Number(value.a)*2) > > > > > this.setStyle("color","red"); > > > > > > > > > > super.invalidateDisplayList(); > > > > > > > > > > } > > > > > } > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Flexcoders Mailing List > > > > > FAQ: > > http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > > > > Search Archives: > > > > > http://www.mail-archive.com/flexcoders%40yahoogroups.com > > > > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/