1 Reply Latest reply on Jan 30, 2011 11:16 AM by Shongrunden

    access itemrenderer problem

    mohsena

      I have group container that have itemrenderer  ,I use Array of valueobject to pass date to itemrenderers . days.dataprovider =daysDisplay , days is the group container  and daysDisplay is  an arry of value object. I can access  indexes of  DaysDispaly but I can't access to itemrenderer instance which is deigned to show each of the above value object  :

      Definition of datagroup

      <s:DataGroup x="7" y="54" width="158" height="134"
       id="days_g" itemRenderer="DateChooser.components.DayIcon" rollOverColor="#B6E3FF">
           <s:layout>
                <s:TileLayout horizontalGap="0" verticalGap="0" requestedColumnCount="7"/>
           </s:layout>
      </s:DataGroup>
      

      Setting dataprovider for datagroup:

      ays_g.dataProvider=daysToDisplay; // daysToDisplay is an ArrayList  contains my valueObjects
      
      

      Registerig click event for datagroup:

      days_g.addEventListener(MouseEvent.CLICK,onDaysClick);
      
      

      Event handler:

      private function onDaysClick(evt:MouseEvent):void{
                          //here I tried  to access the select method of clicked item renderer
                          
       }
      

      thank you for your attention.