Try setting styleName before super.validateNow(). It might just be simpler to choose the color based on whether the DataGrid’s isHighlightedItem returns true or not. That’s what is going on in the renderer code.
-Alex On 8/15/11 5:28 AM, "Sells, Fred" <[email protected]> wrote: Flex 4. And the regular mx:DataGrid not the Advanced one. From: [email protected] [mailto:[email protected]] On Behalf Of Alex Harui Sent: Monday, August 15, 2011 2:08 AM To: [email protected] Subject: Re: [flexcoders] style css problem Which version of DataGrid are you using? On 8/14/11 2:50 PM, "Sells, Fred" <[email protected] <fred.sells@adventis! tcare.org> > wrote: I’m trying to use styleName in a renderer like so .payor1{ fillAlphas: 1.0, 1.0; fillColors: #8c8c8c, #8c8c8c; color: red; roll-over-color: green; rollOverColor: green; } ! With this code in the DataGridItemRenderer. Color is set OK, but I cannot get the rollover. If I have the wrong property name, where would I find the definit! ion of the right ones. &! nbsp;&nb sp; override public function validateNow():void { super.validateNow(); if (data==null || data.resident__id=="0") { ! background = false; this.text = null; this.styleName=""; ! retu! rn; }else{ this.text=""+data.name; this.styleName = "payor"+data.payor; background = true; } } -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui

