Flex DataGrid中列绑定ComboBox
发布时间:2020-12-15 05:09:57 所属栏目:百科 来源:网络整理
导读:?xml version="1.0" encoding="utf-8"? mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" mx:Script ![CDATA[ import mx.collections.ArrayCollection; public var datas:ArrayCollection = new ArrayCollection([1,2,3,4]); pr
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; public var datas:ArrayCollection = new ArrayCollection([1,2,3,4]); private var gridDatas:ArrayCollection = new ArrayCollection([ {col1:1,col2:2,col3:3},{col1:1,col3:3} ]); ]]> </mx:Script> <mx:DataGrid x="89" y="111" width="350" height="145" dataProvider="{gridDatas}"> <mx:columns> <mx:DataGridColumn headerText="Column 1" dataField="col1"/> <mx:DataGridColumn headerText="Column 2" dataField="col2"/> <mx:DataGridColumn headerText="Column 3" dataField="col3"> <mx:itemRenderer> <mx:Component> <mx:ComboBox dataProvider="{outerDocument.datas}"/> </mx:Component> </mx:itemRenderer> </mx:DataGridColumn> </mx:columns> </mx:DataGrid> </mx:Application> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |