0 Replies Latest reply on Aug 13, 2007 5:27 PM by Handycam

    Custom formatter in DataGrid?

    Handycam Level 1
      I created a custom formatter that takes a decimal number and returns a fraction (string). I can use it with some sample text areas, like so:

      <comp:FractionFormatter id="makeFraction" myNumber="{myTI.text}"/>
      <mx:TextInput id="myTI"/>
      <mx:TextArea text="Formatted string is {makeFraction.format(myTI.text)}"/>

      But if I try to use it in my DataGrid, like so:

      <mx:DataGridColumn dataField="{makeFraction.format(@qty)}" width="35" wordWrap="true"/>

      The compile fails with "Error: Access of undefined property qty."

      Suggestions?