Show an image as Tooltip in a GridDataCell

1 Answer 572 Views
Grid Tooltip
Bernd
Top achievements
Rank 1
Bernd asked on 09 Sep 2021, 03:52 PM

Hi,

I got the following question:

How to show an image as Tooltip in a GridDataCell?
The image should only be visible if the user hovers over the cell.

Thanks in advance,

Ben

1 Answer, 1 is accepted

Sort by
0
Hetali
Telerik team
answered on 12 Sep 2021, 11:21 PM

Hi Bernd,

We have a dedicated article to Render Tooltips for Grid Cells. Using this example, make the following changes to show an image in the Tooltip:

<ng-template #template let-anchor>
  <img 
    style="width: 100px"
    src="{{ gridData[anchor.nativeElement.getAttribute('ng-reflect-data-row-index')].Image }}"
  />
</ng-template>

In this StackBlitz example, an image is shown in the tooltip when you hover over the ProductName column cells.

Please give this example a try and let me know if it helps or if I can further assist you.

Regards,
Hetali
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid Tooltip
Asked by
Bernd
Top achievements
Rank 1
Answers by
Hetali
Telerik team
Share this question
or