Skip to main content

Posts

Showing posts from December, 2011

Flex: ToolTip on Spark DataGrid Rows

We can use Spark DataGrid's showDataTips and dataTipFunction properties to show customized tool tips on the rows.
An example showing this:
<?xml version="1.0" encoding="utf-8"?> <s:Application initialize="onInitialize()" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"> <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; import mx.utils.StringUtil; private static function fnDataTip(item:Object, column:GridColumn):String { var toolTip:String = item[column.dataTipField != null ? column.dataTipField : column.dataField]; if (toolTip == null || StringUtil.trim(toolTip) == "") toolTip = ""; if (item.hasOwnProperty("toolTipComment") && item.toolTipComment != null && item.toolTipComment.le…