you are right ;-)

in my previous post i forgot :

super.data = value

On Tue, May 5, 2009 at 9:10 PM, - - <sailorse...@yahoo.com> wrote:

>
>
> Thanks guys, got it working.
>
> *override* *public* *function* *set* data(value:Object):*void*
>
> {
>
> *super*.data = value;
>
> if(data.amount < 50)
> {
> smileImage= 'smile001.png';
> }
> else if(data.amount >= 50)
> {
> smileImage= 'smile002.png';
> }
>
> }
>
>  ------------------------------
> *From:* Fotis Chatzinikos <fotis.chatzini...@gmail.com>
> *To:* flexcoders@yahoogroups.com
> *Sent:* Tuesday, May 5, 2009 12:04:34 PM
> *Subject:* Re: [flexcoders] Sorting columns in a Datagrid don't sort with
> itemRenderer...
>
>  you should not just do staff in creation complete
>
> set the smilies in the set data function
>
> even if sort works you will not get correct behaviour with just creation
> complete
>
> On Tue, May 5, 2009 at 5:21 PM, sailorsea21 <sailorsea21@ 
> yahoo.com<sailorse...@yahoo.com>
> > wrote:
>
>>
>>
>> Hi everyone, I'm having a problem with sorting columns in a datagrid when
>> using itemRenderer.
>>
>> Without the itemRenderer, everything works fine but when I use an
>> itemRenderer, the column with the itemRenderer doesn't sort, it simply
>> rotates the rows of that column....
>>
>> dgColumn.itemRender er = new ClassFactory( Smiles);
>>
>> Here's my itemRenderer file Smiles.mxml:
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <mx:Canvas xmlns:mx="http://www.adobe. com/2006/ 
>> mxml<http://www.adobe.com/2006/mxml>"
>> creationComplete="setSmileImage( )">
>>
>> <mx:Script>
>> <![CDATA[
>>
>> [Bindable]
>> private var smileImage:String;
>>
>> private function setSmileImage( ):void
>> {
>> if(data.amount < 50)
>> {
>> smileImage= 'smile001.png';
>> }
>> else if(data.amount >= 50)
>> {
>> smileImage= 'smile002.png';
>> }
>> }
>>
>> ]]>
>> </mx:Script>
>>
>> <mx:Image id="image" verticalCenter="0" horizontalCenter="0"
>> source="{smileImage}"/>
>>
>> </mx:Canvas>
>>
>>
>
>
> --
> Fotis Chatzinikos, Ph.D.
> Founder,
> Phinnovation
> Fotis.Chatzinikos@ gmail.com <fotis.chatzini...@gmail.com>,
>
>  
>



-- 
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
fotis.chatzini...@gmail.com,

Reply via email to