Show tooltip only for <TD> elements that have certian CSS class

4 posts, 0 answers
  1. Mahesh
    Mahesh avatar
    2 posts
    Member since:
    Jul 2014

    Posted 13 Mar 2015 Link to this post

    How can I enable Tooltip only for <TD> which have "contains-data" class? The <TD> elements which do not have "contains-data" class should not open Tooltip.


    @(Html.Kendo().Tooltip()
    .For("#Grid")
    .Filter("td.contains-data")
    .ContentTemplateId("template")
    .Width(400)
    .Height(200)
    .AutoHide(false)
    .ShowOn(TooltipShowOnEvent.Click)
  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2156 posts

    Posted 16 Mar 2015 Link to this post

    Hello Mahesh,

    The provided sample code is correct and is working as expected on my side. Are you experiencing any issues with it?

    I am looking forward to hearing from you.

    Regards,
    Dimiter Madjarov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Mahesh
    Mahesh avatar
    2 posts
    Member since:
    Jul 2014

    Posted 16 Mar 2015 in reply to Dimiter Madjarov Link to this post

    Thanks for the reply Dimiter.

    It works (opens Tooltip) for <TD> elements which have "contains-data" class but when I click <TD> elements which do not have "contains-data" class, Tooltip opens.

    As I said in previous post, the <TD> elements which do not have "contains-data" class should not open Tooltip.
  5. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2156 posts

    Posted 16 Mar 2015 Link to this post

    Hello Mahesh,

    I am unable to reproduce this on my side. The tooltip is shown only for the cells with the specified class. Make sure that the class is added only to the correct cells on your end.

    If the issue is still reproducing, please send us an isolated runnable example that we could inspect locally and assist further.

    Regards,
    Dimiter Madjarov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET MVC is VS 2017 Ready