首页 > 其他 > 详细

(转)flex中DataGrid中itemRenderer的button的click调用方法问题

时间:2014-12-30 16:36:07      阅读:201      评论:0      收藏:0      [点我收藏+]

原网址:http://www.ylzx8.cn/duomeiti/flex/504893.html

button放在DataGrid的itemRenderer里面,为什么调用方法,提示不存在

XML code

    <mx:DataGrid id="dgSelUser" width="100%" height="50%" dataProvider="{flowPeoples}">
         <mx:columns>
        <mx:DataGridColumn headerText="姓名" dataField="userid" />
        <mx:DataGridColumn headerText="部门" />
        <mx:DataGridColumn headerText="管理">
           <mx:itemRenderer>
             <mx:Component>
            <mx:LinkButton label="选择人员" width="30" click="selUser()" />
             </mx:Component>
           </mx:itemRenderer>
        </mx:DataGridColumn>
         </mx:columns>
    </mx:DataGrid>


为什么我的button调用selUser方法提示不存在,,我写在<mx:DataGrid click="selUser()" ../>怎么就可以呢,,需要怎么写
------解决方案-------------------- Renderer里面访问外部变量要用outerDocument 同时selUser要是public的 <mx:LinkButton label="选择人员" width="30" click="outerDocument.selUser()" />

(转)flex中DataGrid中itemRenderer的button的click调用方法问题

原文:http://www.cnblogs.com/lotusgu/p/4193673.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!