<mx:DataGridColumn headerText="操作" width="60" dataField="customer_id">
<mx:itemRenderer>
<mx:Component>
<mx:HBox verticalAlign="middle" horizontalAlign="center">
<mx:LinkButton focusEnabled="false" width="10"
icon="@Embed(source='assets/images/edit.png')"
click="outerDocument.editCus()"/>
<mx:LinkButton focusEnabled="false" width="10"
icon="@Embed(source='assets/images/delIcon.png')"
click="outerDocument.deleteCus()"/>
</mx:HBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
</mx:VBox>
<mx:itemRenderer>
<mx:Component>
<mx:HBox verticalAlign="middle" horizontalAlign="center">
<mx:LinkButton focusEnabled="false" width="10"
icon="@Embed(source='assets/images/edit.png')"
click="outerDocument.editCus()"/>
<mx:LinkButton focusEnabled="false" width="10"
icon="@Embed(source='assets/images/delIcon.png')"
click="outerDocument.deleteCus()"/>
</mx:HBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
</mx:VBox>
本文介绍了一个使用 Flex 实现的数据网格组件,该组件包含了编辑和删除操作按钮。通过自定义 DataGridColumn 的 itemRenderer 属性,实现了每行数据末尾显示图标按钮的功能,点击这些图标将触发相应的编辑或删除事件。
1564

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



