Category Archives: DataGridColumn

Using a CFF embedded font with a Halo DataGrid control in Flex 4

The following example shows how you can use a CFF embedded font with a Halo DataGrid container by setting the itemRenderer property or defaultDataGridItemRenderer style to the mx.controls.dataGridClasses.TLFDataGridItemRenderer class.

Full code after the jump.

Continue reading Using a CFF embedded font with a Halo DataGrid control in Flex 4

Aligning the header text in a DataGrid column in Flex (redux)

In a previous example, “Aligning the header text in a DataGrid column in Flex”, we saw how you could set the text alignment on a Flex DataGrid control’s DataGridColumn by setting the headerStyleName and textAlign styles.

The following example shows a few more methods of aligning data and headers in a DataGrid and individual DataGrid columns by setting a combination of the headerStyleName and textAlign styles on the DataGrid and DataGridColumn instances.

Full code after the jump.

Continue reading Aligning the header text in a DataGrid column in Flex (redux)

Performing case [in]sensitive sorts using the DataGrid control in Flex

The following example shows how you can perform numeric sorts, case sensitive sorts, or case insensitive sorts in the Flex DataGrid control by setting a custom sort compare function on the DataGridColumn using the sortCompareFunction property, the static ObjectUtil.numericCompare() method, and the static ObjectUtil.stringCompare() method.

Full code after the jump.

Continue reading Performing case [in]sensitive sorts using the DataGrid control in Flex