mx.utils.ArrayUtil.toArray(ResultEvent(event).result)
<mx:WebService id="srv"
useProxy="false"
wsdl="http://flex.homesmartagent.com
/cfc/adminHS2F.cfc?wsdl"
result="agents = new ArrayCollection(mx.utils.ArrayUtil.toArray (ResultEvent(event).result))"
showBusyCursor="true" />
Does that work?
-abdul
On 2/28/06, Jeremy Rottman
<[EMAIL PROTECTED]> wrote:
I am using a webservice to call a function from my cfc that returns
data as xml. When the data results are received, I convert the results
into an array named agents. I am trying to populate my dg with the
array. When I click on the dg I am calling the function
agentDisplayQry. Which calls the function in my cfc. However, I cant
get this to work. Can someone help me with this.
Here is what I am trying.
<mx:Script>
import mx.collections.ArrayCollection;
[Bindable]
public var agents:ArrayCollection;
</mx:Script>
<mx:WebService id="srv"
useProxy="false"
wsdl="http://flex.homesmartagent.com/cfc/adminHS2F.cfc?wsdl "
result="agents = new
ArrayCollection(srv.agentDisplayQry.result.list.employee)"
showBusyCursor="true" />
Then I am using this dg to display the information.
<mx:DataGrid x="18" y="291" width="695"
click="agentDisplayQry(fileNum.text)" dataProvider="{agents}"
height="192" id="datagrid1"> <mx:columns>
<mx:DataGridColumn headerText="Agent Name" width="275"
columnName="agentName"/>
<mx:DataGridColumn headerText="Transaction Side" width="150"
columnName="agentSide"/>
<mx:DataGridColumn editable="true" headerText="% of Side"
width="95" columnName="col3"/> <mx:DataGridColumn
headerText="Type" width="175" columnName="agentType"/>
</mx:columns>
</mx:DataGrid>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

