This question is locked. New answers and comments are not allowed.
Hi Telerik team,
I'm trying to implement the tooltip for each cell in a grid. In some cases, the tooltip shows the correct value of the cell that is being hovered over; and sometimes it's incorrect. See the attached screenshot for the case of it showing incorrectly.
Here is my code:
Thanks!!
I'm trying to implement the tooltip for each cell in a grid. In some cases, the tooltip shows the correct value of the cell that is being hovered over; and sometimes it's incorrect. See the attached screenshot for the case of it showing incorrectly.
Here is my code:
void
GridViewCellLoaded_TT(
object
sender, CellEventArgs e)
{
var cell = e.Cell
as
GridViewCell;
if
(cell ==
null
|| cell.Value ==
null
||
string
.IsNullOrWhiteSpace(cell.Value.ToString()))
return
;
var tt = cell.GetValue(ToolTipService.ToolTipProperty);
if
(tt !=
null
)
return
;
var tooltip =
new
ToolTip
{
Content = cell.Value
};
cell.SetValue(ToolTipService.ToolTipProperty, tooltip);
}