The rows in a DataGrid are recycled, so if
you set a color to red, you must reset it to black (or whatever default you
want). In your set data function, if you are doing something like:
if (data.myval > 50)
{
setStyle(‘color’,
0xFF0000);
}
Then, you should add
else
{
setStyle(‘color’,
0x000000);
}
I hope this helps.
Joan
From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Nikmd23
Sent: Friday, May 26, 2006 5:33 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Issue with
Sorting DataGrid with itemRenderer
I'm having an issue when
I sort a DataGrid which has a column that is
a custom itemRenderer. My renderer colors the text it outputs as red
if a certain value is passed in. That works great, however, when I
sort the datagrid, the red element changes it's position, and leaves
the red color behind.
I have also produced the same problem with a boolean value that shows
an image if true. The blank rows (false records) get filled with the
image when sorted.
Is there some sort of clearing/sorting method I'm supposted to
override along with the data setter?
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS