3 Replies Latest reply on Dec 27, 2006 8:06 AM by awclemen

    Formatting Numbers in a Data Grid

    Andrew_Lattimore Level 1
      Does anyone know how to apply <mx:NumberFormatter> to a <mx:DataGridColumn>?

      I have a datagridcolumn that is reading from a database that needs to have number formatting applied. Some of the numbers have no precision and some have up to six digits after the decimal point, but I want to have a standard two-digit precision applied to all numbers. My function is correct and it can be applied to a textinput, but I don't know how to apply it to a datagridcolumn. My function is below:

      <mx:NumberFormatter id="myNum" precision="2" decimalSeparatorTo="." rounding="up" />

      Any assistance is greatly appreciated.