views:

26

answers:

1

Hi,

I have a combobox with multi selection. when i click on add button, which ever data is selected in the Combobox, those data has to be displayed in the another comboBox.

Please check the code and Can anyone of you please help me on this.

<mx:HBox>
 <mx:Label width="140" text="{resourceManager.getString   ('resources', 'settings_configuration_database_select_object_instance')}"/>
     <mx:List id="obj_instance" enabled="true" allowMultipleSelection="true" width="164" height="70"/>      
     <mx:Spacer width="20"/>
     <mx:Button label=">>"/>
     <mx:List id="selected_instance" enabled="true" allowMultipleSelection="true" width="164" height="70"/>
</mx:HBox>      

Thanks, Ravi

+1  A: 

What about:

<ov:HPButton label=">>">
    <ov:click><![CDATA[
        for each (var item:* in obj_instance.selectedItems)
            selected_instance.dataProvider.addItem(item);
    ]]></ov:click>
</ov:HPButton>

Of course, you'll have to make sure that the dataProvider of instance is something reasonable (like an ArrayCollection)…

David Wolever
i have modified the code in above, pls check it.
Ravi K Chowdary
What did you modify? And have you tried my suggestion? If not, please modify it as appropriate then try it.
David Wolever
I had tried your suggestion. It was workin fine.Thanks David
Ravi K Chowdary