2 Replies Latest reply on Jan 18, 2011 2:45 AM by Magesh R

    How to assign itemrender variables in global public variable of my applicaton.

    Magesh R


      Hi Friends,

       

      How to assign internal item render values in global public variable. can u see below example.

      List have one itemrender,within the itemrender i am using data grid .The  dataGrid have itemrender.now i tried the data grid itemrender assign values to public variable of my application,but the Error came... How can u slove this Problem Any One can Help to me.

       

      Example:

       

      public var myData:arrayCollection;

       

       

       

      <mx:List variableRowHeight="true" dataChange="validateNow()"  width="900" id="Lst_userlist" verticalScrollPolicy="off"  horizontalScrollPolicy="off" 
           buttonMode="true">
            
      <mx:itemRenderer>
            
        <fx:Component>       
            
         <mx:VBox paddingTop="-5"  horizontalScrollPolicy="off" verticalScrollPolicy="off" >        
             
               <fx:Script>
                <![CDATA[        
                
                 override public function set data(value:Object):void
                 {
                        ------

                          -----     
                 }
                
                        
                          
                ]]>
               
               </fx:Script>
              
               <mx:VBox id="vbox_grid" horizontalScrollPolicy="off" verticalScrollPolicy="off" width="890"  paddingLeft="10" paddingTop="5"

                       backgroundColor="#317152" color="#FFFFFF">        
                        
               
                <mx:DataGrid visible="false" includeInLayout="false" height="100%" id="membershipGrid" alternatingItemColors="[#DCDCDC,#F8F8FF]"

                    paddingLeft="5"  horizontalScrollPolicy="off" color="black"
                    horizontalGridLines="false" verticalScrollPolicy="auto"  verticalGridLines="false"   rowHeight="25"
                    borderSkin="{null}" showHeaders="true" borderVisible="false" dataProvider="{data.dataCollection}" width="900" >
                     
                
                 <mx:columns>
                 
                  <mx:DataGridColumn width="180" headerText="Name" minWidth="150" sortable="true"  wordWrap="true" >
                   <mx:itemRenderer>
                    <fx:Component>
                    
                     <mx:HBox horizontalScrollPolicy="off"   >
                     
                      <fx:Script>
                       <![CDATA[
                       
                        override public function set data(value:Object):void
                        {
                          -----

                          -----

                         }
                       
                        function Click_Name():void
                        {
                     

                          outerDocument.myData=data;  //  Here Error  came                 

                           }
                       
                       ]]>
                      
                      </fx:Script>
                      <mx:Image id="fileimg"    buttonMode="true"  toolTip="This is the User's Home Organization"/>          
                      <s:Label  id="lbl_Gridcloumn_name"  width="200" buttonMode="true" textDecoration="underline"  click="Click_Name()"  />
                     
                     </mx:HBox>
                    </fx:Component>
                   
                   </mx:itemRenderer>
                  </mx:DataGridColumn>

      </cloumn>

      </datagrid>

       

      Error:

              Access of possibly undefined property myData through a reference with static  type com.istmanagement.views:ProgramAcessRights_ComponentInnerClass3.

       

      Thanks,

      Magesh R.