hi all,
I have a doubt here with object properties and ArrayCollection.
i have an xml for my datagrid like the following tree
DataGridSrc
row row row row
c1 c2 c3 c1 c2 c3 c1 c2 c3 c1 c2 c3
the column node names i,e C1, C2, C3 has to come as the header for my
datagrid. based on the number of rows, the data has to come in the
data part of my datagrid. we can achieve this very easily with static
coding techniques.
but i want it dynamically. because i don't know how many columns will
i have in the result xml. based on the number of columns in the xml, i
have to render my datagrid.
(for better understanding., for the above tree xml, datagrid will have
3 columns, if i change the number of columns in the xml, i want to
replicate that much columns in the datagrid, with the header field of
the column name what i mention in the xml's column node name)
What i have tried is,
for each(row in xml.rows)
{
for each( col in row.childeren)
{
create a new object;
get the children_name
object.children_name= col.toString() // I'm clever i think,
so only it fails here
}
push that object to an array
}
display that array : [object : Object].....
very big misunderstanding of object's concepts i think.
so people, please help me out to convert XML to well defined
ArrayCollection
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---