Sunday, April 4, 2010

HTTPService and string value.

We are having an unexpected issue in our application. One of
the tags returned by a HTTPService is:



%26lt;lot_code%26gt;7E00024%26lt;/lot_code%26gt;



And we bind this to a data grid column using:



%26lt;mx:DataGridColumn headerText=''Lot Number''
dataField=''lot_code''/%26gt;



But the value displayed is:



7e+24



So Flex is automatically converting it to a number and
showing in exponential format. How do we define the XML so we force
a value to be ''string'' or ''text''?



Thanks in advance.

HTTPService and string value.
Hi

How are you receiving your data?

as E4X, XML, OBJECT?



That is important, because for instance if it comes like xml
you can use a tostring() to get a node like a string, check de
documentation about XML on adobe livedocs

HTTPService and string value.
Yes... just realized that E4X does not convert to object and
keep the values as strings, it is working fine now. Thanks for the
tip.

No comments:

Post a Comment