in my flex application im retrieving a data from database…..
(ie) price as decimal(18,4)…
Now i need to display the retrieved value in an flex text box
textbox name is price.text…
obj is object name…
i have used the following in code…it not works…
price.text = obj.Price.toPrecision((18,4));
.kindly give ur suggestions folks….
Take a look at the
NumberFormatter. To follow your example, you would declare aNumberFormatterlike so:or in Actionscript:
Then use the
NumberFormatter‘s format function on your value: