On 6/27/05, sanjayd <[EMAIL PROTECTED]> wrote:

> I wanted to color a cell in a grid, if the value (in the cell) meets
> certain conditions (for example, if the value is negative). So, I
> added couple of lines of code in the setValue() method of the
> cellRenderer. This works. However, the problem is that, the setValue()
> method gets called very frequently.. 

setValue() is called every time you scroll because the DataGrid reuses
the rows and just updates them with new data every time.  If rowCount
is 7 (default) and you have 100 rows, the DataGrid always maintains
just 7 row objects and keeps reusing them (nice, no?).

That's your only option, AFAIK.


--
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/
 


Reply via email to