3 Replies Latest reply on Sep 3, 2008 6:09 AM by nikos101

    ItemRenderer in a datagrid column   setStyle() does not do anything to the appearance

    nikos101 Level 2
      I have a custom ItemRenderer in a datagrid column, however the setStyle() does not do anything to the appearance. when it is called. Any ideas?

      <mx:DataGridColumn dataField="area" width="50"
      headerText="Area">
      <mx:itemRenderer>
      <mx:Component>
      <mx:Text>
      <mx:Script>
      <![CDATA[
      override public function set data( value:Object ) : void {
      super.data = value;
      setStyle("Color",0xff0000);

      if(data.area == 'G'){
      setStyle("backgroundColor",0xff0000);
      }else{
      setStyle("backgroundColor",0xff0000);
      }



      }
      ]]>
      </mx:Script>

      </mx:Text>
      </mx:Component>
      </mx:itemRenderer>
      </mx:DataGridColumn>