Re: [flexcoders] Sorting columns in a Datagrid don't sort with itemRenderer...

2009-05-05 Thread Fotis Chatzinikos
you are right ;-)

in my previous post i forgot :

super.data = value

On Tue, May 5, 2009 at 9:10 PM, - -  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 
> *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  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:
>>
>> 
>> http://www.adobe. com/2006/ 
>> mxml<http://www.adobe.com/2006/mxml>"
>> creationComplete="setSmileImage( )">
>>
>> 
>> 
>> 
>>
>> > source="{smileImage}"/>
>>
>> 
>>
>>
>
>
> --
> Fotis Chatzinikos, Ph.D.
> Founder,
> Phinnovation
> Fotis.Chatzinikos@ gmail.com ,
>
>  
>



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


Re: [flexcoders] Sorting columns in a Datagrid don't sort with itemRenderer...

2009-05-05 Thread Fotis Chatzinikos
Hi,

I do not have any experience with the DataGrid classes but doing your logic
inside

override public function set data(value:Object):void
{
}

should do it...

drop the creation complete and try :

override public function set data(value:Object):void
{
if(data.amount < 50)
{
smileImage= 'smile001.png';
}
else if(data.amount >= 50) // NO NEED FOR ELSE IF ... ELSE WILL DO ;-)
{
smileImage= 'smile002.png';
}
}

On Tue, May 5, 2009 at 8:41 PM, - -  wrote:

>
>
> Hi Fotis, do I set that in the DataGridColumn Class ?
>
>  --
> *From:* Fotis Chatzinikos 
> *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  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:
>>
>> 
>> http://www.adobe. com/2006/ 
>> mxml<http://www.adobe.com/2006/mxml>"
>> creationComplete="setSmileImage( )">
>>
>> 
>> 
>> 
>>
>> > source="{smileImage}"/>
>>
>> 
>>
>>
>
>
> --
> Fotis Chatzinikos, Ph.D.
> Founder,
> Phinnovation
> Fotis.Chatzinikos@ gmail.com ,
>
>  
>



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


Re: [flexcoders] Sorting columns in a Datagrid don't sort with itemRenderer...

2009-05-05 Thread - -
Thanks guys, got it working.

overridepublicfunctionsetdata(value:Object):void{
if(data.amount < 50)
{
smileImage= 'smile001.png';
}
else if(data.amount >= 50)
{
smileImage= 'smile002.png';
}
}super.data = value; 




From: Fotis Chatzinikos 
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  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:


http://www.adobe. com/2006/ mxml" 
creationComplete="setSmileImage( )">


 









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




  

Re: [flexcoders] Sorting columns in a Datagrid don't sort with itemRenderer...

2009-05-05 Thread - -
Hi Fotis, do I set that in the DataGridColumn Class ?





From: Fotis Chatzinikos 
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  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:


http://www.adobe. com/2006/ mxml" 
creationComplete="setSmileImage( )">


 









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




  

Re: [flexcoders] Sorting columns in a Datagrid don't sort with itemRenderer...

2009-05-05 Thread Fotis Chatzinikos
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  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.itemRenderer = new ClassFactory(Smiles);
>
> Here's my itemRenderer file Smiles.mxml:
>
> 
> http://www.adobe.com/2006/mxml";
> creationComplete="setSmileImage()">
>
> 
> 
> 
>
>  source="{smileImage}"/>
>
> 
>
>  
>



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