Flex drops out decimal zeroes??


hello, i´m facing problem this:

 

php file returns output (example.php):

 

<tests>

<test1>this string<test1>

<test2>100.03<test2>

<test3>100.00<test3>

</tests>

 

in mxml file have (data.mxml):

 

<mx:httpservice id="userrequest" url="./php/text/example.php" result="_resultcontaineron=0;">

<!-- , non-important stuff -->

</mx:httpservice>

 

<mx:datagrid id="resulttable" dataprovider="{userrequest.lastresult.tests}" >

                            <mx:columns>
                                <mx:datagridcolumn headertext="test1" datafield="test1" />
                                <mx:datagridcolumn headertext="test2" datafield="test2"/>
                                <mx:datagridcolumn headertext="test3" datafield="test3/>

                            </mx:columns>

</mx:datagrid>

 

and result in ui:

test1                   test2     test3    

this string     100.03  100

 


how can force "100.00" string flex wouldn´t handle number , drop out decimal zero?

 

thank answers , professional knowledge!

use tofixed method of number class.

 

see http://www.adobe.com/livedocs/flash/9.0/actionscriptlangrefv3/number.html

 

e.g.

var goodstring = number.tofixed(2);



More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

How to decompile jsxbin to jsx

Gavik Photoslide GK2: Not able to upload photos - Joomla! Forum - community, help and support

Phoca Guestbook logger registret bruger af - Joomla! Forum - community, help and support