This content has been marked as final. Show 5 replies
Are you binding the dataProvider to the result directly, or using a result handler function?
What does the structure of the data look like?
Have you set the HTTPService resultFormat to anything?
my resultFormat is text/XML
i have three value in databse
i am getting all three value in one row in combobox like AAA BBB CCC
becaz i m getting all the value in just one string'
so how can i do it?
No, your resultFormat is not "text/XML", that is your ASP page's response ContentType.
"resultFormat" is a property on the HTTPService tag. If you have not set it yourself. then it is "object".
I don't need to know what the data in the database is, I need to know what the structure of the result object is. What is the structure of the xml that is output by the asp page?
How are you debugging your code, Flex builder, tracing or alert boxes?
Are you using a result handler function to assign the result to the combobox dataProvider or are you using binding?
Post the code.
here i am sending the codeof both asp page and mxml page:
ihope now the picure becomes clear;
Combobox and the other list based controls require an Array as the dataProvider, where each element in the array creates an item or row. When you do this:
var sData:String = xmlnodeTest.toString();
You are creating an array with a single element that contains all the text of the xml. this is why you get only one row with all the data.
Since the resultFormat is XML, you can get the item array using the childNodes property of the root node. So Instead you want something like:
var myDP:Array = xmlnodeTest.childNodes;
Combobox will default to looking for "label" and "data" properties. If your item xml nodes do not have these exact attributes, you will need to use a labelFunction to put the correct data into the Combo box. What is the structure of the xml that is output by the asp page? Call it directly from a browser, and post a few nodes.