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

被折叠的 条评论
为什么被折叠?



