On Wed, Feb 26, 2014 at 1:29 AM, ashish1703
<[email protected]>wrote:
> Hi Om,
>
> Thanks for a quick look up, however this still doesn't resolve my issue.
>
> For instance i am getting a value="100" from the database displayed in one
> of the grid column.
> This is how i followed with the conversion:
> Step 1: the data returned in the column as string is 100.00
> Step 2: passed the value to parseFloat IE. parseFloat(value) gives me 100
> and not 100.00.
>
> Is it how it should be done or i am doing it wrong?
>
>
Yes, and then, as I explained, in your labelFunction, you need to do a
toFixed(2) on the number like this:
private function myLabelFunction(item:Object, column:DataGridColumn):String
{
var num:Number = parseFloat(item);
return num.toFixed(2);
}
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Data-type-to-convert-and-store-a-srting-into-decimal-float-value-tp5202p5208.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>