How to access components inside a itemerederer(datagridColumn)


hi all,

in recent appilcation iam using button inside datagridcolum itemerenderer.

 

<columns:extendeddatagridcolumn
                                            
            >
                <columns:itemrenderer>
                    <mx:component>
                        <mx:hbox width="50" horizontalalign="center">
                            <mx:button width="16" height="20"                                                                         
                                visible="true"
                                id= "editbuttonid"
                                tooltip="bearbeiten"
                               
                                click="outerdocument.editbuttonclicked(event)"         

                                />
                        </mx:hbox>                       
                    </mx:component>
                </columns:itemrenderer>
</columns:extendeddatagridcolumn>

 

by using "outdoucument" can able access method in parent appliaction.

my question how access button id(editbuttonid) in parent.

 

thanks in adavance

hi

 

           code u have achieved here wrong because id property not allowed in component tag... using inline itemrenderers not work , not coding standards.. u can use in simple , applications... if ur item renderer not going work thing..

 

 

        if  ur item renderer having functionality create saperatate item renderer , use component in ur datagrid u can access components inside itemrenderer ..

 

               posting u sample code  here

 

                   create seperate item renderer per example mycomitemrenderer.mxml

 

                     <mx:hbox width="50"  horizontalalign="center">
                             <mx:button width="16"  height="20"                                                                           
                                visible="true"
                                 id= "editbuttonid"
                                 tooltip="bearbeiten"
                               
                                 click="outerdocument.editbuttonclicked(event)"         
                                 />
                        </mx:hbox>   

 

                         and use itemrenderer in column in datagrid...

 

 

                              <columns:extendeddatagridcolumn itemrenderer="..../mycomitemrenderer.mxml"/>

 

this u .. ..



More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

Hur installera Joomla på One.com - Joomla! Forum - community, help and support

removing index.php from URL address - Joomla! Forum - community, help and support

「イメージマップのアンカー名には、...」のエラーが出ないようにしたい