Hi, I'm new in Adobe Flex. I'm a .Net developer and I need to create a simple Flex application that use Asp.Net to grab data from a SQL Server. To send data from Asp.Net to Flex I use an XML string. Then I insert my data in a Flex DataGrid.
Now i can change the values in the DataGrid cells.
The problem is to send back the data to my Asp.Net application for update the database.
How i can generate a XML string of the data that is in the Flex DataGrid?
There is a kind of DataSet in Flex?
Thanks for help!
I think you might be using a HTTPService or a WebService to fetch the data as XML and might be using an operation to save the data as XML. FlashBuilder will automatically convert your incoming XML to flex to appropriate data types (through the serialization code built in serialzers.swc, present as part of your project, that can translate XML or JSON strings to AS datatypes), but when you want to send the data as XML back to the server, you have to write some code.
1. If you are using HTTPService, override the serializeParameters function of the XMLSerializer (com.adobe.serializers.xml.XMLSerializationFilter)
2. If you are using WebService, you can set up a parameter conversion handler which can convert AS object to XML using the convertParametersHandler in the WebService class.
If you want Flex to do this conversion for you, please file an enhancement request under bugs.adobe.com/flex