[flexcoders] Re: Changing the background color of a DataGrid row

2008-04-24 Thread valdhor
Yes. Check out itemRenderers. The best article on this is at
http://blogs.adobe.com/aharui/item_renderers/

--- In flexcoders@yahoogroups.com, jlopes151 [EMAIL PROTECTED] wrote:

 In Flex3 I want to set the background color of a data grid row. Can I 
 do it?
 
 Thanks for the Help.





[flexcoders] Re: Changing the background color of a DataGrid row

2008-04-24 Thread jlopes151
--- In flexcoders@yahoogroups.com, valdhor [EMAIL PROTECTED] wrote:

 Yes. Check out itemRenderers. The best article on this is at
 http://blogs.adobe.com/aharui/item_renderers/
 
 --- In flexcoders@yahoogroups.com, jlopes151 jlopes151@ wrote:
 
  In Flex3 I want to set the background color of a data grid row. 
Can I 
  do it?
  
  Thanks for the Help.
 


Forgot mention that I only want to change the color of the first 
row, default the others. I'm worried if I setup a counter or 
firstrow var it will get reset when the next row is created. I'll 
take a look at the blog.

Thanks 



[flexcoders] Re: Changing the background color of a datagrid row

2006-09-23 Thread Tim Hoff



Hi Carl,
The following sample uses a custom component to change the backgroundColor of a DataGrid row; conditionally with CSS.
http://www.cflex.net/showfiledetails.cfm?ChannelID=1Object=FileobjectID=487
-TH--- In flexcoders@yahoogroups.com, "carl_steinhilber" [EMAIL PROTECTED] wrote: I'm setting the dataProvider of a DataGrid to an ArrayCollection (of Objects).  If the value of a given field of a given row is a particular value, I want to change the row of the DataGrid to red, say.  I already have a labelFunction on the DataGridColumn for something else.  And Brandon Purcell tells me that setting the background color of a row is fairly easy:  dg.setPropertiesAt(rowNum, {backgroundColor:0xFF});  Is it possible to determine the row number of the row that a labelFunction is currently affecting, so that I could also do a setPropertiesAt() and pass it said row number?  In other words... I have  mx:DataGrid name="dg" id="dg" width="100%" height="100%" mx:columns mx:DataGridColumn dataField="date" labelFunction="formatDate" headerText="Date" / /mx:columns /mx:DataGrid  and my formatDate function wants to look like:  public function formatDate(columnData:Object,columnDef:DataGridColumn):String { dg.setPropertiesAt(whateverRowThisIs, {backgroundColor:0xFF}); DateDisplay.format(columnData.date); }  Anyone know how to determine "whateverRowThisIs"?  Or do I really need to use a itemRenderer? That seems like overkill to just change the background color.  Any help would be appreciated.  Thanks! -Carl

__._,_.___





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

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___