1 Reply Latest reply on Jul 10, 2007 4:54 PM by ntsiii

    How to pass in values to an item render?

    Level 7
      I have a custom item render setup for a datagrid cell. What I would
      like to happen is that the background color of the render to be based on
      a value from an array determined by the data.severity integer. How
      might one do this?

      TIA
      Ian

      <mx:DataGridColumn dataField="severity" headerText="Severity"
      itemRenderer="Components.Renderers.severity"/>

      Component.Renderers.severity.mxml
      ---------------------------------
      <?xml version="1.0" encoding="utf-8"?>
      <mx:VBox xmlns:mx=" http://www.adobe.com/2006/mxml"
      textAlign="center"
      verticalGap="0" horizontalGap="0">
      <mx:Label text="{data.severity}" width="100%" minHeight="0" />
      </mx:VBox>