This content has been marked as final. Show 5 replies
"CodeFlash05" <firstname.lastname@example.org> wrote in message
> Hi, I have an Flex web application where I stream data into to DataGrids
> the HTTPService via XML from a database. I am running into the problem of
> numbers such as 10.00 10.90 are being displayed as 10 or 10.9, so its
> all the unnecessary 0's
> There are alot of functions to fix this, but I also need this DataColumn
> to be
> able to display data formatted like 1:00.00 or 30:02.32. All the functions
> have found do not let those stay in their proper format.
> I've been racking my brain for a while on this and tried many solutions,
> none havent worked right and I'm hoping someone has an answer otherwise I
> I'll have to scrap the application. Display raw data directly to the
> application would work too. I have attached some code. Thanks for any
Set your resultFormat to e4x
Yup. What is happening is that with the default resultFormat, flex is converting your xml into a tree of dynamic objects. Along the way it is trying to be helpful about converting data types. It is not as smart as it thinks it is.
e4x is the way to go.
This looks promising, and I hate to sound dumb, but I was going to see if you guys might know where I need to use the resultFormat?
I'm in a pinch and have a lot of other things going on but really want to get this working...I tried the following and no data came up
First, verify your xml in the handler:
var xmlFromDatabase:XML = XML(oEvent.result);
trace(xmlFromDatabase.toXMLString()); //does this look liky what you expect?
Then, get your xmllist:
var xlData:XMLList = xmlFromDatabase.data.row; //adjust this according to what you see in the trace
trace(xlData.toXMLString()); //is this your list?
If that is right, assign that the the DataGrid.dataProvider
Also, why are you setting "contentType"?