4 Replies Latest reply on Feb 19, 2009 8:32 AM by Gregory Lafrance

    Dynamic Item Renderer

    MrFork Level 1
      Hello,

      I'm trying to add an image to datagrid but I want to add that image multiple times if the data within the cell is over a certain value, thus producing a rating bar depending upon the value.

      Does anyone have any ideas?

      Thanks

      <mx:AdvancedDataGridColumn dataField="ATVIndex">
      <mx:itemRenderer>
      <mx:Component>
      <mx:HBox>
      <mx:Script>
      <![CDATA[
      override public function set data(value:Object):void
      {
      super.data = value;

      if (value.ATVIndex <= 1)
      {
      // add image to HBOX
      }
      }
      ]]>
      </mx:Script>
      </mx:HBox>
      </mx:Component>
      </mx:itemRenderer>
      </mx:AdvancedDataGridColumn>