2 Replies Latest reply on Nov 18, 2010 2:23 AM by Magesh R

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

    Magesh R Level 1

      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.gi f");
             }
             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.

        • 1. Re: If you have any possible with in the itemrender have one is label control and onther one is data gri
          drkstr_1 Level 4

          If I understand correctly, you want to display a different set of data in a DataGrid for each item selected in a List?

           

          I would just use binding:

           

          <mx:List id="list" />
          <mx:DataGrid id="dg" dataProvider="{list.selectedItem.data}" />
          

           

           

          This assumes that list is populated with data items in a format similar to this:

           

          {

            label : "List Label 1",

            data : [

               { col1 : "col1", col2: "col2"},

               { col1 : "col1", col2: "col2"},

               { col1 : "col1", col2: "col2"}

            ]

          }

          • 2. Re: If you have any possible with in the itemrender have one is label control and onther one is data gri
            Magesh R Level 1

            Hi Friend,

             

            The list values are display Even if i click perticular data list value ,the corresponind data grid are display in blow line data list...

            can u see below sample.

             

            Blue colotr items are List values

            Green Color items are Data Grid values... If click Blue color name then only correspond data grid items are display...

            Canvass360 01

            Canvass360 01

            canvass360-01

            HR Demo

            System Wide Auth Admin UT

            Canvass360 01

            canvass360-01

            HR Demo

            System Wide DocStor Admin UT

            Andrew Addison

            Andrew Addison

            AAddison

            HR Demo

            System Wide Auth Admin UT

            Andrew Addison

            AAddison

            HR Demo

            System Wide DocStor Admin UT

            System Admin

            System Admin

            Admin

            HR Demo

            MyOrg Administrator UT

            System Admin

            Admin

            HR Demo

            Regional Manager UT

            System Admin

            Admin

            HR Demo

            Site Manager UT

            System Admin

            Admin

            HR Demo

            System Wide Auth Admin UT

            System Admin

            Admin

            HR Demo

            System Wide DocStor Admin UT

            Ben Affleck

            Ben Affleck

            Ben

            HR Demo

            Site Manager UT

            Jennifer Aniston

            Jennifer Aniston

            JenniferA

            HR Demo

            Site Manager UT

            Christian Bale

            Christian Bale

            Christian Bale

            HR Demo

            Site Manager UT

            Brad Burgess

            Brad Burgess

            BBurgess

            HR Demo

            System Wide DocStor Admin UT

            Sean Connery

            Sean Connery

            SConnery

            HR Demo

            Site Manager UT

            Harrison Ford

            Harrison Ford

            HFord

            HR Demo

            Regional Manager UT

            Megan Fox

            Megan Fox

            MFox

            HR Demo

            Regional Manager UT

            Chuck Gamble

            Chuck Gamble

            CGamble

            HR Demo

            MyOrg Administrator UT

            Chuck Gamble

            CGamble

            HR Demo

            Regional Manager UT

            Chuck Gamble

            CGamble

            HR Demo

            Site Manager UT

            Chuck Gamble

            CGamble

            HR Demo

            System Wide Auth Admin UT

            Chuck Gamble

            CGamble

            HR Demo

            System Wide DocStor Admin UT

            Chuck Gamble

            CGamble

            HR Demo

            OnBoarding UT

             

            Please Any One Help to me.

             

             

            Thanks,

            Magesh R.

            Amiee Mann

            AMann

            HR Demo

            Regional Manager UT

            Jennifer Smith

            JenniferSmith

            HR Demo

            Site Manager UT

            Reese Witherspoon

            Reese

            HR Demo

            Site Manager UT