PDA

View Full Version : datatip pops up everything in the XML


stonyx
08-07-2006, 07:27 PM
i'm using e4x to make a filter search on my xml
there are some names biggger then the row and i don't want to use word wrap cause it looks ugly, if i set showdatatips to true when hoover over a name it popsup everything in the xml is there any other way to do datatip?
or to tell it i just want the name tag?

<mx:DataGridColumn dataField="name" showDataTips="true"/>

<catalog>
<book>
<name></name>
<desc></desc>
<image></image>
</book>

<book>
.....
....
</book>
</catalog>

flexy
08-14-2006, 06:09 PM
You could try removing the big cheesy grin from your DataGridColumn tag. ;)

You could also use 'dataTipFunction' to format your datatips, though looking at the code you're using there, are you using 1.5?

stonyx
08-14-2006, 07:46 PM
You could try removing the big cheesy grin from your DataGridColumn tag. ;)

You could also use 'dataTipFunction' to format your datatips, though looking at the code you're using there, are you using 1.5?

HI i'm using 2.0 trial
instead of the datatips i decided to used wordwrap cause i never found something about datatips that could help me not even in the live docs thank you any way if you still have a solution for it i'll apreciaciate a example code thanks

flexy
08-15-2006, 08:30 AM
Try here: http://www.flexdeveloper.eu/forums/YaBB.pl?num=1155630566/0#0

glacts
08-23-2006, 09:32 PM
I too have noticed this issue. If you use resultFormat="e4x" in your mx:HTTPService tag, you get the entire XML doc as your datatip. If you omit the resultFormat (and use the default object methodology), then the datatip works perfectly. That is an imperfect solution, however, if you are interested in utilizing e4x.

Oh yeah, I tried Flexy's solution, but it only seems to work for charts. If I'm using a DataGrid, then I get the following error: TypeError: Error #1034: Type Coercion failed: cannot convert XML@40e6929 element <resource id="200601" name="blah" type="service" version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> to mx.charts.HitData.

One other question, I noticed that when using objects as opposed to e4x, if you have an xml tag with a numeric value of "1.0", the e4x treats it as a string and displays "1.0", however the object treats it as a number and displays "1". Is there a way to cast the object so that it displays "1.0" instead. I couldn't get it to work.

Thanks.

stonyx
08-24-2006, 02:33 AM
I too have noticed this issue. If you use resultFormat="e4x" in your mx:HTTPService tag, you get the entire XML doc as your datatip. If you omit the resultFormat (and use the default object methodology), then the datatip works perfectly. That is an imperfect solution, however, if you are interested in utilizing e4x.

Oh yeah, I tried Flexy's solution, but it only seems to work for charts. If I'm using a DataGrid, then I get the following error: TypeError: Error #1034: Type Coercion failed: cannot convert XML@40e6929 element <resource id="200601" name="blah" type="service" version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> to mx.charts.HitData.

One other question, I noticed that when using objects as opposed to e4x, if you have an xml tag with a numeric value of "1.0", the e4x treats it as a string and displays "1.0", however the object treats it as a number and displays "1". Is there a way to cast the object so that it displays "1.0" instead. I couldn't get it to work.

Thanks.
thank God i thought i was the only one with that problem hope somebody have a solution