Sunday, April 4, 2010

DataGrid: dataTipField doesn't seem to...

I have a heavily custom styled DataGrid and have a need to
show tool tips for data in the columns, especially for columns that
use images (symbols).



The tool tips show up nicely (set dataTipField and
showDataTips) except for columns that use an itemRenderer which in
my case, are quite a few columns...



Help! Any idea how to get around this problem?



ThanksDataGrid: dataTipField doesn't seem to...
Found a solution if your itemRenderer is anActionScript
subclass:



You will have to set the itemRenderer's toolTip yourself.



1. Still set the dataTipField to the dataField that holds
your tool tips.



2. Overwrite the set data method like this:



override public function set data(value:Object):void

{

super.data = value;



// Assign the dataTipField value to the toolTip

this.toolTip = data[this.styleName.dataTipField];

}



This seems to work fine for me.

No comments:

Post a Comment