Thank you for taking the time to answer my question and explaining the datagrid
dataprovider. I think what what problem is the way the xml I am importing is
formatted. The root node is the name of the xml, then I have the repeating
node. Within the repeating node I have data that needs to go in the datagrid.
Problem is the tag names within the repeating node. Please see my example:
root
repeat
feature/feature
value/value
feature/feature
value/value
/repeat
repeat
feature/feature
value/value
feature/feature
value/value
/repeat
/root
What I need to do is to put the feature data in repeat[0].feature into a
datagrid. But because feature is in repeat[0] twice(20 in the real app) it
will not load it properly.
Any idea how to accomplish this? I have been trying for several weeks now with
no luck.Ha!
Thanks in advance.
--- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote:
First, the DataGrid dataProvider itself must be some kind of list. It can
be an ArrayCollection, an XMLListCollection, an Array or XMLList(avoid these
if you plan to programmatically update the dataProvider)
There are two ways to get an HTTPService result into a dataProvider. One is
to bind to lastResult.avoid this. Instead, use a resultHandler to assign the
appropriate list type to a variable, and bind to that.
If you dataProvider is valid, you might have just forgotten to specify the
dataField for the columns.
If you are setting that property, then you need to know that dataField can
only handle a string, not an expression, and the property specified must be
a top-level property of the dataProvider item. If the dataProvider items
are XML nodes, the datafield must specify a first-level childNode(data in
the text node of that node) or an attribute. If it is an attribute then you
need to use the @ symbol. Example: dataField=@myAttribute.
Hope this helps.
Tracy Spratt,
Lariat Services, development services available
_
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Quintjer
Sent: Sunday, January 17, 2010 10:49 AM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] e4x to Datagrid not removing the tags when
rendered
Hello all,
I am importing an xml file in air to a datagrid but the data in the grid is
still showing the tags. I have tried everying that I can think of. Earlier I
tried imporing the file using HTTP server as an object and then got the data
to display properly at that point but this has be be imported as xml.
AnyIdeas are greatly appreciated.