Darron,
I did use setPropertiesAt function as you have suggested. But my problem
is that
when I use it the way you have suggested, employee_dg.setPropertiesAt(rowInd,
{backgroundColor:0xFFF00});
the bg
color of the row does not change instanlty. I have to click somewhere in the
datagrid for the color change to take place whereas when I hard code the row
index ie. employee_dg.setPropertiesAt(1,
{backgroundColor:0xFFF00}); the bg color is changed instantly. I
need not click on the datagrid for it to do it. Could you tell me
why?
Attached is a sample app to see this peculiar
behavior..
Thanks,
Shweta
___________________________________
Shweta
Parekh
Bureau of Labor Statistics, Room# 5930
202.691.7449
-----Original Message-----Parekh, Shweta - BLS CTR wrote:
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Darron J. Schall
Sent: Tuesday, November 08, 2005 3:35 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Changing the background color of row in datagrid
>
> I also tried using employee_dg.rows[rowInd].backgroundColor =
> "0xfff00"; for changing the background color for a row but this does
> not work.
>
This should probably be added the to FAQ as it gets asked a lot:
// Use "setPropertiesAt" to set the background color of an individual row:
theListOrGrid.setPropertiesAt( rowIndex, { backgroundColor: 0xFF0000 } );
-d
--
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
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
deptComp.mxml
Description: deptComp.mxml
department.mxml
Description: department.mxml<?xml version="1.0" encoding="utf-8"?> <departments> <department> <deptId>01</deptId> <deptName>Accounting</deptName> <employees> <employee> <name>Christina Coenraets</name> <phone>555-219-2270</phone> <email>[EMAIL PROTECTED]</email> <active>true</active> </employee> <employee> <name>Louis Freligh</name> <phone>555-219-2100</phone> <email>[EMAIL PROTECTED]</email> <active>true</active> </employee> <employee> <name>Ronnie Hodgman</name> <phone>555-219-2030</phone> <email>[EMAIL PROTECTED]</email> <active>false</active> </employee> <employee> <name>Joanne Wall</name> <phone>555-219-2012</phone> <email>[EMAIL PROTECTED]</email> <active>true</active> </employee> </employees> </department> <department> <deptId>02</deptId> <deptName>Human Resource</deptName> <employees> <employee> <name>Maurice Smith</name> <phone>555-219-2012</phone> <email>[EMAIL PROTECTED]</email> <active>false</active> </employee> <employee> <name>Mary Jones</name> <phone>555-219-2000</phone> <email>[EMAIL PROTECTED]</email> <active>true</active> </employee> </employees> </department> </departments>