HTML content in tooltip?

7 posts, 0 answers
  1. Craig
    Craig avatar
    12 posts
    Member since:
    Feb 2013

    Posted 07 Mar 2013 Link to this post

    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?
  2. Rosen
    Admin
    Rosen avatar
    3237 posts

    Posted 08 Mar 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. Craig
    Craig avatar
    12 posts
    Member since:
    Feb 2013

    Posted 08 Mar 2013 Link to this post

    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.
  5. Rosen
    Admin
    Rosen avatar
    3237 posts

    Posted 11 Mar 2013 Link to this post

    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!
  6. Craig
    Craig avatar
    12 posts
    Member since:
    Feb 2013

    Posted 20 Mar 2013 Link to this post

    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.)
  7. Rosen
    Admin
    Rosen avatar
    3237 posts

    Posted 21 Mar 2013 Link to this post

    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!
  8. Craig
    Craig avatar
    12 posts
    Member since:
    Feb 2013

    Posted 22 Mar 2013 Link to this post

    Yes, I was able to achieve the correct behavior by modifying the filter on the tooltip.
Back to Top
Kendo UI is VS 2017 Ready