Skip navigation
hobbes26
Currently Being Moderated

s:MXAdvancedDataGridItemRenderer

Aug 2, 2012 3:47 AM

Tags: #itemrenderer #advanceddatagrid #flex4.5

Hi, I need an s:MXAdvancedDataGridItemRenderer that will change the color and fontweight(bold) for the whole line at depth 2 when a particular column is greater than 1.68. Here is what I have so far and, unfortunately, it does not seem to work:

 

 

<?xml version="1.0" encoding="utf-8"?>
<s:MXAdvancedDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" 
          xmlns:s="library://ns.adobe.com/flex/spark" 
          xmlns:mx="library://ns.adobe.com/flex/mx" 
          focusEnabled="true">
 <fx:Script>
  <![CDATA[
   import mx.states.SetStyle;
   override public function set data(value:Object):void
   {
    super.data = value;
    if(value[prob] >= 1.68)
    {
     this.setStyle('color', '#0000FF');
     this.setStyle('fontweight', 'bold');
    }        
   }
  ]]>
 </fx:Script> 
</s:MXAdvancedDataGridItemRenderer>

I don't mind having to attach the renderer to every single column if there is no better option but you would think that it would be possible to change the whole row based on one simple condition. Thanks for any help or leads on this.  E.

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points