Hi all,
Got it working by using the result format of http service to
"e4x" and modifying the datagrid like this
*<mx:DataGrid id="dgUserRequest" x="22" y="128" dataProvider="{
userRequest.lastResult.user}" >
<mx:columns>
<mx:DataGridColumn headerText="User ID" dataField="userid" />
<mx:DataGridColumn headerText="User Name" dataField="username"/>
</mx:columns>
</mx:DataGrid>*
Thanks
On Jan 9, 2008 6:45 PM, YOGESH JADHAV <[EMAIL PROTECTED]> wrote:
> Hi all,
> I trying out the tutorial at
> http://devzone.zend.com/article/11-Integrating-Adobe-Flex-and-PHP
> It is working half way but, i.e. values are submitted properly to
> database. But Manipulating data is creating problem.
> Here is the original code for displaying data.
>
> *<mx:DataGrid id="dgUserRequest" x="22" y="128"
> dataProvider="{userRequest.result.users.user}">
> <mx:columns>
> <mx:DataGridColumn headerText="User ID" columnName="userid"/>
> <mx:DataGridColumn headerText="User Name" columnName="username"/>
> </mx:columns>
> </mx:DataGrid>
> <mx:TextInput x="22" y="292" id="selectedemailaddress"
> text="{dgUserRequest.selectedItem.emailaddress}"/>
> </mx:Application>*
>
> But it was giving error for columnName, as i changed it id, i started
> complaining as another textinput was having same name as userName, i changed
> it userName1 and added result and fault properties to my HTTPService
>
> *<mx:HTTPService id="userRequest" url="http://nikhil/request.php"
> useProxy="false"
> result="handlePlain(event);"
> fault="handleFault(event);"
> resultFormat="text"
> method="POST">
>
>
> private function handlePlain(event:ResultEvent):void
> {
> dgUserRequest.dataProvider = event.result;
> //userid.dataField = event.result.users.userid;
> //username1.dataField = event.result.users.username;
> }
>
> private function handleFault(event:FaultEvent):void
> {
> Alert.show(event.fault.toString(),"Error");
> }
>
>
> *Now it gives me error that it cant find 'users' in string , i tried by
> changing the result format from text to xml and e4x, but it is of no use.
> assigning each field to each column doesn't make sense.
>
> Any kinda help will be appreciated.
>
> Regards,
> Yogesh
--
Regards,
Yogesh