Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flex Number Format

I want to format a number in indian format.

for example,

x= 123456 should be formatted as 1,23,456.

How can i do it in flex?

Thanks,

like image 361
Srinivasan Avatar asked Jan 23 '23 10:01

Srinivasan


1 Answers

Use the numberformatter.

<mx:NumberFormatter id="myFormatter"
    decimalSeparatorFrom="."
    decimalSeparatorTo="."
    precision="-1"
    rounding="none"
    thousandsSeparatorFrom=","
    thousandsSeparatorTo=","
    useNegativeSign="true"
    useThousandsSeparator="true"/>

actionscript code

x = myFormatter.format(x);
like image 193
Shua Avatar answered Feb 05 '23 17:02

Shua