0 Replies Latest reply on Nov 18, 2010 3:39 AM by Magesh R

    If you have any possible with in the itemrender have one is label control and onther one is datagrid

    Magesh R

      Hi Friends,

                      If you have any possible with in the itemrender have one is label control and onther one is data grid control.

       

      In my application i was using list control.The list control have item renderer. In my case if i click list control of label name, the corresponding releated data of data grid need to display and list control label also.

       

       

      <mx:List width="750" id="Lst_userlist" verticalScrollPolicy="off"  horizontalScrollPolicy="off" rowCount="20"
      labelField="sec_user_first_name+sec_user_last_name" labelFunction="BindUserName" buttonMode="true" itemClick="Click_UserList(event)" >
       
      <mx:itemRenderer>
            
        <fx:Component>
             
         <mx:VBox  horizontalScrollPolicy="off" verticalScrollPolicy="off" >        
              
           <s:Label id="lbl_userhead" name="{data.sec_user_first_name+data.sec_user_last_name}" buttonMode="true" color="#000000"/>

       

                 

       

                <mx:DataGrid height="100%" id="membershipGrid" alternatingItemColors="[#DCDCDC,#F8F8FF]"  paddingLeft="5"  horizontalScrollPolicy="off" color="black"
            horizontalGridLines="false" verticalScrollPolicy="auto"  verticalGridLines="false"   rowCount="{membershipArrColl.length}" rowHeight="25"
                  borderSkin="{null}" showHeaders="true" borderVisible="false" dataProvider="{membershipArrColl}" width="750"  visible="false" includeInLayout="false">
       
      <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{
             super.data = value;
                       
             if(data.home_sec_organization_id==data.sec_organization_id)
             {
              fileimg.load("/ist_shared/ist_images/ist_icons/Modern/gif/16/hot/user _favorites_16_hot.gif");
             }
             else
             {
              fileimg.load("/ist_shared/ist_images/ist_icons/Modern/gif/16/dis/user _remove_16_dis.gif");
             }
             lbl_Gridcloumn_name.text=data.sec_user_first_name+" "+data.sec_user_last_name;
             }
                      
             ]]>
                     
            </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" toolTip="User Menu [{data.sec_user_name}]" click="outerDocument.Click_Name(event);"    />
                    
           </mx:HBox>
          </fx:Component>
         </mx:itemRenderer>
        </mx:DataGridColumn>
        <mx:DataGridColumn width="120" minWidth="110" headerText="UserName" sortable="true"  dataField="sec_user_name"  />
                
        <mx:DataGridColumn width="100" minWidth="80"  headerText="OrgName"  dataField="sec_org_name">
                
      </mx:columns>
               
      </mx:DataGrid>

                     
                     

       

         </mx:VBox>
        </fx:Component>
            
      </mx:itemRenderer>
      </mx:List>

       

       

      Please Any One Help to me...

       

       

       

      Thanks,

      Magesh R.