I can only tell you how to access the XML file and pull into Flex, but I never used the Datagrid with XML (only SQL).
Here is a simple example of putting XML data into a dropDown.
<?xml version="1.0" encoding="utf-8"?>
library://ns.adobe.com/flex/mx" width="400" height="300" creationComplete="dropDownListXML.send()">
<!-- Place non-visual elements (e.g., services, value objects) here -->
<s:HTTPService id="dropDownListXML" url="EBSnewMileStones.xml" />
10" y="10" width="240"
Sorry I couldn't be of more help. I do know that th datagrid has an option when you right-click it to "Bind to Data" - perhaps that will help.
1 person found this helpful
There are several ways to access the xml
you must decide which are going to use to have the server talk to you flex client app.
Once you decide that then you can get access to the xml using a varierty of techiques again you have to decide whether you are going to use "E4X" or "object" the decision you make here is somewhat dependent on what you are comfortable with and what type of service you will be using.
if you would want you app to automatically update when the xml changes then you are going to want to use "AMF" however i fyou don want to get into "AMF" then it is my experience you can simulate looking back at the server by simply putting a timer on the application and have run every 30 seconds or so dependent on what you like.
Post up if you have any other questions.
here is a link to help you get started.
It will probably require a combination of HTTPService, XMLListCollection and
The major problem I might have with a datagrid, is that my application needs to look like the attached.
Yea, I'm thinking I may move this to the DataGrid.
OK -thanks for all the information (AMF sounds interesting). One last question: Regardless of the method I use to bring in XML, can the XML items populate TextArea text and tooltip properties? Is it possible? (I'll read the articles and docs to find out how if it is possible )
FYI: In case you are curious - The attached is an example of the Captivate movie that launches from the application (hundreds of these) - you helped me to get this to work quite well.
One last question: Regardless of the method I use to bring in XML, can the XML items populate TextArea text and tooltip properties? Is it possible?
yes its possible to populate the text area with xml however im not sure about tooltip thought i would like to say yes i never done this.
however i couldnt see why not.
But in my case the data access methods are redundant in the sense I already have a ready made XML file and these data access methods such as HTTPService process and finally return XML (in my case its already present). So is there any way to refresh datagrid after a particular time if I bind it with XML service??
I do not know. Sorry 'bout that.
There is no way to do that directly through the XML service.
You can implement a Timer to call this service after a period of time.