Re: [flexcoders] Changing the background color of row in datagrid
we did this recently. Didn't like the setProperties() approach for our situation. We had a colour attribute in our dataprovider. So we ended up with something like this for a custom cell renderer. We have not polished it fully yet, but the idea is there. http://www.macromedia.com/2003/mxml" height="49" width="100%" > height="100%" width="100" marginTop="5" marginBottom="5" fontSize="12" fontWeight="bold" selectable="false"/> On 11/8/05, Parekh, Shweta - BLS CTR <[EMAIL PROTECTED]> wrote: 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-From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com] On Behalf Of Darron J. SchallSent: Tuesday, November 08, 2005 3:35 PMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] Changing the background color of row in datagridParekh, Shweta - BLS CTR wrote:>> 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: 0xFF } );-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. -- Douglas Knudsenhttp://www.cubicleman.comthis is my signature, like it? -- 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 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.
RE: [flexcoders] Changing the background color of row in datagrid
Title: Message 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-From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Darron J. SchallSent: Tuesday, November 08, 2005 3:35 PMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] Changing the background color of row in datagridParekh, Shweta - BLS CTR wrote:>> 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: 0xFF } );-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 01 Accounting Christina Coenraets 555-219-2270 [EMAIL PROTECTED] true Louis Freligh 555-219-2100 [EMAIL PROTECTED] true Ronnie Hodgman 555-219-2030 [EMAIL PROTECTED] false Joanne Wall 555-219-2012 [EMAIL PROTECTED] true 02 Human Resource Maurice Smith 555-219-2012 [EMAIL PROTECTED] false Mary Jones 555-219-2000 [EMAIL PROTECTED] true
Re: [flexcoders] Changing the background color of row in datagrid
Parekh, Shweta - BLS CTR wrote: > > 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: 0xFF } ); -d Yahoo! Groups Sponsor ~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM ~-> -- 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/
[flexcoders] Changing the background color of row in datagrid
Title: Changing the background color of row in datagrid Hi, I would like to be able to change the background color of a row in the datagrid after I click on a row and then enter the letter : n in the input box called print_txt and hit enter. I use the setPropertiesAt method, employee_dg.setPropertiesAt(rowInd, {backgroundColor:0xFFF00}); the row changes its color ONLY after I click on another row or anywhere in the datagrid. However, I don't need to click on another row for it to work if I have the row index as a number i.e. if my code looks like this: employee_dg.setPropertiesAt(1, {backgroundColor:0xFFF00}); where I hard code the row index instead of passing a parameter. Why is this? I don't have a problem with this when changing the color of a cell. I also tried using employee_dg.rows[rowInd].backgroundColor = "0xfff00"; for changing the background color for a row but this does not work. Any ideas why? Thank you. Shweta -- 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.