Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
007none #1
combo box data binding
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
xmlns="*" creationComplete="send_data()">
<mx:HTTPService id="userRequest"
url="http://suse/websites/team/Mahendra/createseries.php"
useProxy="false" result="results(event);"/>
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
[Bindable]
public var arr:ArrayCollection;
[Bindable]
public var aray:Array;
private function results(event:ResultEvent):void
{
arr = event.result.Mylog;
//aray= arr.toArray();
//Alert.show(arr.length.toString());
Alert.show(arr.toString());
}
private function send_data():void {
userRequest.send();
}
]]>
</mx:Script>
<mx:ComboBox id="hello" dataProvider="{arr}" x="86" y="253"
width="133" >
</mx:ComboBox>
</mx:Application>
my php script returning me
<?xml version="1.0" encoding="utf-8"?>
<Mylog>
<series>Convertible</series>
</Mylog><Mylog>
<series>Sedans</series>
</Mylog><Mylog>
<series>Sport</series>
</Mylog>
this is my code . I want to fill combobox with the all values of series
please help me . Means bind the combo box with httpservice result
007none Guest
-
How to display a set of data in a data grid when drivenby a combo box?
I am trying to build a page where the user can select a syle of food (i.e. chinese, italian etc) from a combo. I would then want the relevent... -
Data Binding
I have a webService, dataSet, comboBox and a sumbitButton. The combobox loads and displays Brands from my cfc. I press submit and look at the... -
Complex data binding question, binding child objects of a custom collection.
I have a custom collection of objects, each of which includes a child object called MyUserOpener. In declarative binding, I can bind this property... -
Binding Data
Currently, when I bind data to a DataGrid, I use a function as such: Dim conGrid As SqlClient.SqlConnection Dim daGrid As... -
combo box and data
Hello, I have a form with a combo box to look up account numbers,description,route and stop. This works fine. What I need to learn is how to get... -
SujitG #2
Re: combo box data binding
Hi,
set the labelField of the ComboBox to "series" as show in the code below.
Hope this helps.
<mx:ComboBox id="hello" dataProvider="{arr}" labelField="series" x="86"
y="253" width="133" >
</mx:ComboBox>
SujitG Guest
-
007none #3
Re: combo box data binding
I have changed my php code it will return me this xml
<?xml version="1.0" encoding="utf-8"?>
<Mylog>
<product productId="1">
<series>Convertible</series>
</product>
<product productId="2">
<series>Sedans</series>
</product>
<product productId="3">
<series>Sport</series>
</product>
</Mylog>
then i have changed 2 place
arr = event.result.Mylog.product;
and yeah label field in combo
Thanks
007none Guest
-
abcd #4
Re: combo box data binding
how to bind the combo box value from webservice , to input for another webservice
abcd Guest



Reply With Quote

