>From the code you sent:
 You are already converting the data to float in the list,

So the second parseFloat in the labelFunction is superfluous and will cause the 
app to crash.
You should do:
 return  Number(item[column.dataField] ).toFixed(2);


-----Message d'origine-----
De : Ash1703 [mailto:[email protected]] 
Envoyé : mercredi 26 février 2014 13:39
À : [email protected]
Objet : RE: Data type to convert and store a srting into decimal/float value

for each(var obj:Object in xml received from backend){                          
        
list.addItem({activeper:parseFloat(obj.activeper)});}

grid.dataprovider = above list ;


private function theLabelFunction(item:Object,column:DataGridColumn):String{
var num:Number = parseFloat(item[column.dataField]);
return num.toFixed(2);}


Itemrender is used for comparing the column value with 10 and text color is 
changed depending upon the value...thats it..!!

The itemrender is defined in the mx:tag.

Does it helps??



--
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-tp5202p5219.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Reply via email to