0 Replies Latest reply on Apr 27, 2007 6:01 AM by JoBone00

    DataGrid - ItemRenderer - WordWrap

      I have added an itemrenderer to a datagrid to change the color of individual rows based on the value of of a cell. However, the problem I am having is this. The word-wrap no longer works for the datagrid. I imagine this is because I use a lable in my itemrenderer. I have not been able to find just a good solution that makes the cells look just like the normal datagrid, but with different colors.

      Any suggestions would be greatly appreciated.

      Enclosed is the itemrenderer

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Label xmlns:mx=" http://www.adobe.com/2006/mxml" >

      import mx.controls.listClasses.ListData;

      import com.vo.HistoryDataValueObject;
      import com.model.Model;

      override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
      if (data != null && (data is HistoryDataValueObject) )
      if (data.monetaryAmount.indexOf("-",0) == data.monetaryAmount.length-1 )
      setStyle("color", 0xFF0000);
      setStyle("color", 0x000000);