I am reading dynamic data from the MySQL using JSP and it’s forwarding the details in the form of XML to the Flex. I would like to bind this XML data to the datagrid. Am able to bind the data if the datagrid has only one column but don’t know how to bind data which contains 2-3 columns.
My JSP will forward the details in the following format :
<people>
<person>
<X></X>
<Y></Y>
<Z></Z>
</person>
<person>
<X></X>
<Y></Y>
<Z></Z>
</person>
</people>
Using HTTP Service am able to display this as an Alert message in the Flex but don’t know how to bind this to a datagrid. Any ideas would be greatly appreciated.
There are lots of examples for this on the web. You want something like:
yourDataGrid.dataprovider = yourHTTPRequest.lastresult.people.personor
yourDataGrid.dataprovider = yourHTTPRequest.lastresult.peopleforgive me I have never learnt this. I just try both and see what works. =)
That (or something along those lines) will populate your datagrid, but make sure the
dataFieldattributes for each column matches the same of the XML field you want to store in there.