Put this will work! <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal" creationComplete="creationCompleteHandler(event)"> <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; import mx.utils.ObjectUtil; import mx.events.FlexEvent; [Bindable] private var ac:ArrayCollection; public function creationCompleteHandler(event:FlexEvent):void { ac = new ArrayCollection([ {label:15, data:"sathis"}, {label:17, data:"ramesh"}, {label:18, data:"suresh"} ]); nextCustomer.text = ac.getItemAt(1).data; } private function cbChangeHandler(event:Event):void { if((cb.selectedIndex+1)<ac.length){ nextCustomer.text = ac.getItemAt(cb.selectedIndex+1).data; }else { //looking first customer nextCustomer.text = ac.getItemAt(0).data; } } ]]> </mx:Script> <mx:ComboBox id="cb" dataProvider="{ac}" change="cbChangeHandler(event)"/> <mx:HBox> <mx:Label text="Next Member"/> <mx:Text id="nextCustomer"/> </mx:HBox> </mx:Application>
On Mon, Aug 1, 2011 at 12:45 AM, kurakar <[email protected]> wrote: > Hi Coders > > while i am selecting one item from combo box(field data retrieving > from sql database),the corresponding another field fetching from > database want to show in textbox. for example. > database query is "select customernumber,customername from > cust_table". > customernumber is in combo box(working properly) and the while > selecting firstitem from combobox second item want to show in textbox > (not working). > > Please provide me one sample. > > Thanks > Vigin Kurakar > > -- > 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. > > -- 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.

