...

View Full Version : Binding Datagrid with XML



krish.praveen
12-09-2008, 08:20 AM
Hi..

I am using Web services...in result i am getting xml content.
Same i want to bind with Datagrid ...by using adobe flex.

Here i am placing the code for all of you..

<?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>

Please help me out

thanks

byuhobbes85
12-18-2008, 05:32 PM
Please place code in code brackets so that it will not parse out smilies.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum