:: Forum >>
Tooltip
Hi,
I'm try to expand the below to display the data from a different grid on mouseover except its not working.
Any ideas.?
What I have is as follows:-
grid.onCellMouseOver = function(event, column, row){
if(column == 1) {
this.setCellTooltip(function(column,row){
return this.getCellText(40, row);} );
}
if(column == 2) {
this.setCellTooltip(function(column,row){
return this.getCellText(41, row);} );
}
else{ this.setCellTooltip('') }
}
thanks
Colin
Sunday, April 27, 2008
Do you really mean a different grid or another part of the same grid? Because it appears you are offsetting columns 1 and 2 by 39.
Anyway, from what I can tell of Alex's example, you'll need to call setCellTooltip() on the object when you define it rather than use it dynamically by calling onCellMouseOver().
I'm not entirely sure if setCellTooltip() will work with a function (Alex specifies a value as its argument). But objects can be functions in JavaScript so I don't see why not.
Anthony
Sunday, April 27, 2008
Looks like I spoke too soon. Alex's second example shows you how.
So you would do it something like this -
var gridTooltips = function(column, row)
{
If (column < 3)
return this.getCellText(column + 39, row)
return ""
}
var grid = new AW.UI.Grid;
grid.setCellTooltip(gridTooltips);
Anthony
Sunday, April 27, 2008
You should assign the tooltips in advance, not inside onCellMouseOver event.
Alex (ActiveWidgets)
Monday, April 28, 2008
This topic is archived.
Back to support forum
Forum search