Hi Guys I displayed data in 2 lists (A and B) using HTTP service. I need to move data from one list to another. I already implemented the easier way (the drag and drop). However I need to implement the same functionality if user clicks on ADD button and remove button. If user clicks on 'Add' Button the selected List from A needs to be removed from A and added to B. And if user clicks on Remove the selected items from List B needs to be removed from B and added to A. I implemented the following code but it is not working. Can anyone fix this code for me or let me know where I am messing it up. Please let me know. Thanks in advance for your help
/*Code*/ [Bindable] private var cameraPoolList:Array=new Array(); [Bindable] private var devicesInList:Array=new Array(); /* private function addToAssociatedDevices(evt:MouseEvent):void { var _addDevicesLen:int=devicesInList.length; var _addToAssociatedDevicesArr:Array=new Array(_addDevicesLen); for(var i:*=0;i<_addDevicesLen-1;i++) { _addToAssociatedDevicesArr[i]=nvrsInPoolList.selectedItem; } cameraPoolList.push(_addToAssociatedDevicesArr); <mx:List id="nvrsInPoolList" allowMultipleSelection="true" dragMoveEnabled="true" dragEnabled="true" dropEnabled="true" y="105" x="17" height="462" width="294"/> <mx:List id="camerasInPoolList" allowMultipleSelection="true" horizontalScrollPolicy="on" dragMoveEnabled="true" dragEnabled="true" dropEnabled="true" width="265" height="462" y="105" x="385" /> <mx:Button x="322" y="237" label="Add" id="_addButton" click="addToAssociatedDevices(event)"/> }