Flex DataGrid中添加Label,Button,CheckBox,ComboBox

这篇博客详细介绍了如何在Flex DataGrid中添加并使用Label、Button、CheckBox和ComboBox,包括设置数据字段、响应点击事件等操作,帮助开发者实现更丰富的数据展示和交互功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

<mx:DataGrid id="dgList" resizableColumns="false" x="510" y="430" rowCount="6" dataProvider="{_fileList}" width="480" rowHeight="27">  

 <mx:columns>  

  <mx:DataGridColumn headerText="文件名称列表" dataField="docName"/>  

  <mx:DataGridColumn headerText="文本测试显示">  

   <mx:itemRenderer>  

    <mx:Component>  

     <mx:Label text="showText" color="#00089" textDecoration="underline" useHandCursor="true"   

         buttonMode="true"  mouseChildren="false" click="单击方法"/>  

    </mx:Component>  

   </mx:itemRenderer>  

  </mx:DataGridColumn>  

  <mx:DataGridColumn textAlign="center"headerText="CheckBox" dataField="你要指定的字段" >  

   <mx:itemRenderer>  

    <mx:Component>  

     <mx:CheckBox paddingLeft="30" selected="true/false" click="单击方法 "/>  

    </mx:Component>  

   </mx:itemRenderer>  

  </mx:DataGridColumn>  

  <mx:DataGridColumn textAlign="center" width="70" headerText="Button">  

   <mx:itemRenderer>  

    <mx:Component>  

     <mx:Button label="Button" buttonMode="true" cornerRadius="4" click="单击方法"  />  

    </mx:Component>  

   </mx:itemRenderer>  

  </mx:DataGridColumn>  

   <mx:DataGridColumn headerText="测试显示" dataField="completePreStr" editorDataField="value" id="jindu" editable="true" >  

            <mx:itemEditor>  

                <mx:Component>  

                        <mx:ComboBox editable="true" width="100">  

                            <mx:dataProvider>  

                                <mx:String>test1</mx:String>  

                                <mx:String>test2</mx:String>  

                                <mx:String>test3</mx:String>  

                                <mx:String>test4</mx:String>  

                                <mx:String>test5</mx:String>  

                            </mx:dataProvider>  

                        </mx:ComboBox>  

                </mx:Component>  

            </mx:itemEditor>  

</mx:DataGridColumn>  

 </mx:columns>  

</mx:DataGrid>  

 

 博客地址:http://www.lwxshow.com/dev/flex/added-to-the-flex-datagrid-labelbuttoncheckboxcombobox.html

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

几号资源

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值