Highlighted

Filing DataGrid Component with Web Services

Krish_praveen

08-12-2008

Hi to all..



I am facing the problem of binding xml content with datagrid,
that i got result from web service.



Here i am placing the code..



<?xml version="1.0" encoding="utf-8"?>

<mx:WindowedApplication xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">

<mx:Script>

<![CDATA[

import mx.rpc.events.FaultEvent;

import mx.rpc.events.ResultEvent;

[Bindable]

public var employeeInfo:XMLList;

private function
GetloggedInUserList_result(event:ResultEvent):void{

employeeInfo = event.result as XMLList;

}

]]>

</mx:Script>

<mx:WebService id="s1"

wsdl="
http://localhost:1378/Web%20Services/ResourceManager.asmx?WSDL"
showBusyCursor="true" >

<mx:operation name="GetloggedInUserList"

result="GetloggedInUserList_result(event);" >

<mx:request >

<securityToken>

{token.text}

</securityToken>

</mx:request>

<mx:operation>

</mx:WebService>



<mx:Label id="token"
text="1wEbz/R6H32cdmXr7E/SyEHeFHCRb2RSEa5eObEg1Dqj8ZGGSAV7mNn4HcNEKubI8m9aFCFEnzdO58m0EFgCg56CWhrkiMMtN47MXQZE2Ty29xmlV+m/KXplAb0RMuQew4y8/a5d/XGmYlHSFkaGSQvnlb9LMeuNxyT8zBAB+ePKrbh4jQlvgLN2W6QPFKuG2"
/>



<mx:DataGrid

id="orderGrid"

dataProvider="{employeeInfo}"

width="375" x="443" y="72">

<mx:columns>

<mx:DataGridColumn headerText="UserId" dataField="UserId"
width="40"/>

</mx:columns>

</mx:DataGrid>



</mx:WindowedApplication>



thanks