Export to Excel DataGrid data

Example of using as3xls library to export flex data into Excel file (o csv). This implementation for DataGrid allow using complex data in a DataGridColumn as LabelFunction o ItemRenderer: package com { import com.as3xls.xls.ExcelFile; import com.as3xls.xls.Sheet; import controls.DateRenderer; import flash.errors.IllegalOperationError; import flash.net.FileReference; import flash.utils.ByteArray; import mx.collections.ArrayCollection; import mx.controls.Alert; import mx.controls.DataGrid; import mx.controls.dataGridClasses.DataGridColumn; import mx.controls.dataGridClasses.DataGridListData; import mx.controls.listClasses.ListData; import mx.core.ClassFactory; import mx.core.IFactory; public class FlexToExcel { public function FlexToExcel() { throw new IllegalOperationError (“Class “ExcelExporterUtil” is [...]

Creating a custom label function on a Spark ButtonBar control in Flex 4

In a previous example, “Creating a custom label function on a Flex ButtonBar control”, we saw how you could use a custom label function to create button labels on an MX ButtonBar control in Flex by setting the labelFunction property. The following example shows how you can set a custom label function to create button labels [...]