As mentioned above, a simple way to do this would be to add a Function label to the specified column and format the data there.
Often I find it much easier to work with objects and then directly XML, so usually, if I get XML from a function, I would create an object and a parser for this XML, and you can also format the data inside the parser if you like .
Another way to handle this would be inside the itemRenderer. Example:
<mx:DataGridColumn id="dgc" headerText="Money" editable="false">
<mx:itemRenderer>
<mx:Component>
<mx:HBox horizontalAlign="right">
<mx:CurrencyFormatter id="cFormat" precision="2" currencySymbol="$" useThousandsSeparator="true"/>
<mx:Label id="lbl" text="{cFormat.format(data)}" />
</mx:HBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
source
share