This content has been marked as final. Show 5 replies
Use a result handler. In that handler, the ResultEvent.result object holds your data. It is probably an array, over which you can loop.
I advise setting resultFormat="e4x" and working with XML XMLList in the hanlder instead of the default. Search the archives for a discussion of why.
Would you care to give an example on how this works? It would be very helpful.
How do you know how your data is received? Did you see it in the debugger? Is it in XML format or plain string format.
You should post some code of how your HTTP service works.
in your httpservice request add the result attribute and pass it a function name that will deal with the result. eg
<mx:HTTPService id="userData" " http://it092/jde/src/asprequest.asp" method="POST" showBusyCursor="true"result="handleUserListResult(event)"/>
then in the script portion create a the above function to deal with the result
public function handleUserListResult(event:Object) :void
// code to store your response into some local array or xmlList, I use xml data back from the server so i use an xml list as follows
var myList:XMLListCollection= new XMLListCollection(XMLList(event.result.children()));
I would second tracy's comment on using xml data rather than passing data as arrays. regarding looping through data, if you are already able to display the data in the data grid then you must have it as an array to use as a data provider. You can access the array properties to get the required value.
If you are unsure how to match a particular datagrid row to the array element, then you can use the datagrids itemClick property and call a function probably passing a column name which might act as a key, eg Project name or Id.
In the function match the Project Name or id with the array element and vola you should have the required data.
hope that helps
Here is an example: