HAi

I Have Two Item Renders ; Which Shares Same DataProvider;

1 Component is TextArea;
2 Label;

When Change in text Label Data Should Be Change At the Time;

Here Am Getting the Index Problem Of ArrayCollection;

Please Check The Code :

<?xml version="1.0"?>
<!-- repeater\RepeaterIndicesProp.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";>

  <mx:Script>
    <![CDATA[
        import mx.controls.Alert;
        import mx.collections.ArrayCollection;
      [Bindable]
      public var myArray:ArrayCollection =new ArrayCollection(
['Company Name','Welcome','Praveen','Mahender','Ramakrishana','Ramesh
Sir','Laxman','Srinivas','Venu']);



      public function hai(event)
      {
        

                        var s= myArray.getItemIndex(0);

                        
myArray.addItemAt(event.currentTarget.text,event.currentTarget.repeaterIndices);
                         
//myArray.itemUpdated(event.currentTargetnull,event.currentTarget.text,event.currentTarget.text);
                         //myArray.enableAutoUpdate();
                         
//myArray.itemUpdated(event.currentTarget,null,event.currentTarget.text,event.currentTarget.text);
                        
      }

      private function mouse_Down(event:Event):void
                        {       
                                  Alert.show(event.currentTarget.text+"hai")
                        }

    ]]>
  </mx:Script>

<mx:HBox width="100%">

<mx:VBox width="50%">
        

        <mx:Repeater  id="reptr" startingIndex="0" dataProvider="{myArray}">
                                        
        <mx:TextArea   change="hai(event)" height="20"
text="{reptr.currentItem}" id="tiCompany"  />
                                        
        </mx:Repeater>
        
</mx:VBox>


  <mx:VBox width="50%">

        <mx:Repeater  id="rptr2" dataProvider="{myArray}">                      
                                        
        <mx:Text x="152" y="{Number(rptr2.currentIndex)*35}" id="t1"
text="{rptr2.currentItem}"   click="mouse_Down(event)"
fontWeight="normal" fontSize="30"/>
                                                        
        </mx:Repeater>  

  </mx:VBox>    
</mx:HBox>
</mx:Application>

Please Give An Idea  Data Binding Between Two Repter Components

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to flex_india@googlegroups.com.
To unsubscribe from this group, send email to 
flex_india+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to