Link to home
Start Free TrialLog in
Avatar of arigs
arigs

asked on

tooltip flex4

Hi Experts,

                   here is my problem, I need to display a tooltip in a particular column of advanceddatagrid. The thing is when we mouse over any value of that column we need to dispaly that corresponding value as tooltip. Thx in advance...
Avatar of Pravin Asar
Pravin Asar
Flag of United States of America image

set

showDataTips="true"

ASKER CERTIFIED SOLUTION
Avatar of deepanjandas
deepanjandas
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Here is simple example for you with custom tooltip

Although this one was written for DataGrid.

Same techniques works for AdvancedDataGrid



<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="doInit();">
<mx:Script>
<!![CDATA[import mx.collections.ArrayCollection; // this holds the grid data
[Bindable]
private var myData:ArrayCollection = new ArrayCollection();private function doInit():void{
myData.addItem({fname:"Joe",lname:"Bloggs"});
myData.addItem({fname:"Joe1",lname:"Bloggs"});
}

private function buildToolTip(item:Object):String{
var myString:String = "";
if(item != null)
{
myString = myString + "Firstname : " + item.fname + "\n";
myString = myString + "Lastname : " + item.lname + "\n"
}
return myString;
}
]]>
</mx:Script>
<mx:DataGrid id="dGrid"  dataProvider="{myData}"  visible="true" dataTipFunction="buildToolTip">
<mx:columns>
<mx:DataGridColumn dataField="fname" headerText="FirstName" showDataTips="true" />
<mx:DataGridColumn dataField="lname" headerText="LastName" showDataTips="true" />
</mx:columns>
</mx:DataGrid>
</mx:Application>
Avatar of arigs
arigs

ASKER

that link was helpful
Avatar of arigs

ASKER

@pravinasar:

           Thx for ur help