This is a migrated thread and some comments may be shown as answers.

HTML content in tooltip?

6 Answers 739 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Craig
Top achievements
Rank 1
Craig asked on 07 Mar 2013, 10:12 PM
I have a field in a grid which contains HTML marked-up content. I want this content to be shown in the tooltip for the column, but the HTML markup is shown. Is there a way of providing HTML markup content for a tooltip?

I'm setting the title attribute on the field as follows (simplified example):
  { width: 40, field: "Description", title: "Description", attributes: { title: 'x<b>yy</b>zz' } },

The tags in my title attribute here get shown in the tooltip rather than being interpreted as markup. Is there a way to tell it to render the content as HTML?

6 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 08 Mar 2013, 08:28 AM
Hi Craig,

I'm unable to observe such behavior locally. Please take a look at this test page, maybe I'm missing something obvious.

Greetings,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Craig
Top achievements
Rank 1
answered on 08 Mar 2013, 07:36 PM
Thanks, your example helped me figure it out.
I needed to add the following:
grid.table.kendoTooltip({
    filter: "td"
});

Without this the tooltip renders showing HTML markup.

I'm noticing another problem now though - after showing the tooltip for one column that same tooltip will show for other columns that don't have a tooltip defined. I can replicate this in your example by removing the title attribute from one of the columns.
0
Rosen
Telerik team
answered on 11 Mar 2013, 08:04 AM
Hi Craig,

Indeed, we are aware of this issue and it has been already fixed. The fix will be included in the official Q1 2013 release.

Regards,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Craig
Top achievements
Rank 1
answered on 20 Mar 2013, 06:10 PM
Rosen, I just switched to the 2013Q1 release and I'm still seeing this problem of the tooltip for one column showing for all columns in the grid. (The problem of losing the first keystroke in a text field when a tooltip is on the grid is fixed though.)
0
Rosen
Telerik team
answered on 21 Mar 2013, 07:17 AM
Hi Craig,

Could you please change the filter of the Tooltip to exclude fields without titles and see if this helps.

grid.table.kendoTooltip({
    filter: "td[title]"
});

Regards,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Craig
Top achievements
Rank 1
answered on 22 Mar 2013, 09:57 PM
Yes, I was able to achieve the correct behavior by modifying the filter on the tooltip.
Tags
ToolTip
Asked by
Craig
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Craig
Top achievements
Rank 1
Share this question
or