If I understood your problem correctly, The following code should solve your problem. It is indeed solved using BindingUtils.
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="init()"> <mx:NumericStepper stepSize="0.01"/> <mx:Script> <![CDATA[ import mx.binding.utils.BindingUtils; [Bindable]private var _selectedIndex:Number = -1; private function init():void { BindingUtils.bindSetter(myFunc, mylist,"selectedIndex"); _selectedIndex = 1; } /* As SelectedIndex Changes, this method gets called and will give you access to the property selected. You can use that or any other prop of the list to do your magic here */ private function myFunc(value:Object):void { //dummy implementation, change this to yours. if(value != -1) { mylist2.dataProvider.addItem(4); } } ]]> </mx:Script> <mx:List id="mylist" dataProvider="{[1,2,3]}" selectedIndex="{_selectedIndex}" width="200" height="200"/> <mx:List id="mylist2" dataProvider="{[1,2,3]}" width="200" height="200"/> </mx:Application> On Jul 29, 4:29 pm, Ravi Mishra <[email protected]> wrote: > Try using collectionChange event of the dataprovider of first list. It > could help. > > -Ravi > > On Jul 29, 4:18 pm, HISSAM <[email protected]> wrote: > > > Its not the question of creation complete > > what when my dataprovider of left list changes?? > > no creation event is gonna trigger > > Also at creation complete how do i access the 1st selected item?? > > > On Wed, Jul 29, 2009 at 6:49 PM, Amol Pandhare > > <[email protected]>wrote: > > > > Hey Hissam, > > > > You might be having a click listener on the left list and a function > > > associated to it. On the same list keep a creationComplete listener and > > > point it to the same listener function as that of the click event. And for > > > the listener function to work make the event type of the attribute as > > > Event, > > > the super class, instead of say ListEvent. Dont forget to set the selected > > > index of the left list. > > > > This should help. > > > > Regards, > > > Amol. > > > > On Wed, Jul 29, 2009 at 4:00 PM, HISSAM <[email protected]> wrote: > > > >> I have already tried that!! > > > >> On Wed, Jul 29, 2009 at 6:26 PM, sheetal <[email protected]>wrote: > > > >>> Try setting the selected index of that list and dispatch click event > > >>> on the list. > > > >>> On Jul 29, 3:14 pm, HISSAM <[email protected]> wrote: > > >>> > I have 2 list(left list /right list ) and click on an item of left- > > >>> > list , data is changed of the right list respective with the item > > >>> > selected in the lest list. > > > >>> > This is working fine with no hassels at all. > > > >>> > My requirement is > > > >>> > At the start i want the 1st item of the right list be selected and > > >>> > dispatch the respective event to change the data of the left list. > > > >>> > How do i go about? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

