PDA

View Full Version : Setting DataGrid Row Color Dynamically


cuk
05-10-2007, 09:36 PM
Hi,

I have data loading from an XML file dynamically into a DataGrid. There are 15 columns and if one of the last three columns carries a negative value, then I want to set the row color to red. I have been trying to serach on this, but couldnt get far.

I read in a Blog that:
dg.setpropertiesAt(2, "backgroundColor:0xFF000");

works, where in dg is the dataGrid and 2 is the Row Number. But, I couldnt get to when and where I can call this? Also when i tried dong this, there seems to be no such function in datagrid directly, so it wouldnt let me proceed.

Please do let me know anything that you feel could work out for me.

Thanks in advance!!!

flexy
05-14-2007, 11:18 AM
Example and some banter about this here: http://www.flexdeveloper.eu/forums/YaBB.pl?num=1156169689

cuk
05-16-2007, 05:10 PM
Thanks flexy, for forwarding that link. I guess i will check it out soon and get back in case i have any problems.

Thanks a lot!!!