0 Replies Latest reply on Apr 27, 2007 6:23 AM by gaiz2000

    Containers as Itemem Renderer

      I am using the following code with intention of rendering this column as two labels inside a HBOX:

      <mx:DataGridColumn headerRenderer="renderers.FcModelContTotalHead20"
      id="mdt20" />

      Here is part of "FcModelContTotal0":
      <mx:HBox xmlns:mx=" http://www.adobe.com/2006/mxml"
      <mx:HBox width="55%" borderStyle="solid" borderSides="right" horizontalAlign="right" paddingBottom="0" paddingTop="0">
      <mx:Label id="ctns" textAlign="right" paddingRight="3" />
      <mx:HBox width="45%" horizontalAlign="right" paddingBottom="0" paddingTop="0">
      id="units" textAlign="right"/>


      public function initLB():void {
      addEventListener("dataChange", handleDataChanged);
      public function handleDataChanged(event:Event):void {
      var idx:int = 0;
      if (data) {
      var fsl:ForecastSkuLine = ForecastSkuLine(data);
      units.text = df.format(Number(fsl.getUnitTotals()[idx]));
      ctns.text = df.format(Number(fsl.getCtnTotals()[idx]));

      The problem is that I cannot retrieve "dataField" value from listData since it is not passed to HBox in this case.

      Any ideas?

      Sorry for the long msg.