Hi Preetham Hegde, Here is my code:
<?xml version="1.0" encoding="utf-8"?> <mx:Application creationComplete="initapp()" xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; import mx.collections.XMLListCollection; import mx.controls.Alert; [Bindable] private var contacts:XMLListCollection; public function initapp():void { XML.ignoreWhitespace = true; XML.prettyPrinting = false; contacts = new XMLListCollection(); } public function add():void { var newContact:XML = new XML("<contact></contact>"); //Setting attributes using .@ //newconta...@name = first.text; //Adding child node using .appendChild var address:XML = <address>{second.text}</address>; var address1:XML = <address1>{first.text}</address1>; newContact = newContact.appendChild(address); newContact = newContact.appendChild(address1); //And using . to set child node contacts.addItem(newContact); Alert.show(""+contacts); } public function send_service():void { /* var params:Object = new Object(); params.contact = contacts.toXMLString(); bookParser.send(params); */ bookParser.send(); } public function fun_result(event:ResultEvent):void { Alert.show("hi the result event"); Alert.show("hi text msg"+event.result.msg); } public function fun_fault(event:FaultEvent):void { Alert.show("hi fault event"); } ]]> </mx:Script> <mx:HTTPService id="bookParser" method="POST" resultFormat="text" url="php/xml_value.php" result="fun_result(event)" fault="fun_fault(event)" > <mx:request xmlns=""> <contact> {contacts} </contact> </mx:request> </mx:HTTPService> <mx:DataGrid x="483" y="45" dataProvider="{contacts}"> <mx:columns> <mx:DataGridColumn headerText="Column 1" dataField="address"/> <mx:DataGridColumn headerText="Column 2" dataField="address1"/> </mx:columns> </mx:DataGrid> <mx:TextInput x="560.5" y="220" id="first"/> <mx:TextInput x="380.5" y="220" id="second"/> <mx:Button x="608" y="250" label="Add" click="add()"/> <mx:Button x="608" y="280" label="send" click="send_service()"/> </mx:Application> Thanks for Ur help Shakthi On Sat, Jan 8, 2011 at 10:00 AM, Preetham Hegde <[email protected]>wrote: > *Can u share ur code, we can say where did u go wrong....* > *or correct ur code and send u back...* > * > * > *If you are using post method then u should encode your xml and then > send....* > * > *Regards, > Preetham Hegde > > > > > On Thu, Jan 6, 2011 at 6:28 PM, vidhya lakshmi <[email protected]>wrote: > >> Hi Heman, >> >> Thanks for ur reply. >> >> i have saved the datagrid values to xml by unable to send through >> HttpService >> >> Could u send me any sample ? >> >> Thanks & Regards >> Shakthi >> >> >> On Thu, Jan 6, 2011 at 4:03 PM, Heman Babu <[email protected]> wrote: >> >>> Hi Shakthi , >>> >>> You can save the datagrid values in Xml and using HttpService you can >>> send to php and save it in the database and vice versa.. >>> >>> >>> On Thu, Jan 6, 2011 at 3:44 PM, shakthi <[email protected]> wrote: >>> >>>> Hi Friends, >>>> >>>> Is there any way to save the datagrid values in to the database mysql >>>> through php >>>> and retrieve it back to the datagrid. >>>> >>>> Have anybody faced this situation ? Please Advice >>>> >>>> >>>> >>>> Thanks & Regards >>>> shakthi >>>> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Flex India Community" group. >>>> To post to this group, send email to [email protected]. >>>> To unsubscribe from this group, send email to >>>> [email protected]<flex_india%[email protected]> >>>> . >>>> For more options, visit this group at >>>> http://groups.google.com/group/flex_india?hl=en. >>>> >>>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Flex India Community" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]<flex_india%[email protected]> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/flex_india?hl=en. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Flex India Community" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<flex_india%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/flex_india?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Flex India Community" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<flex_india%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/flex_india?hl=en. > -- You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/flex_india?hl=en.

