RadToolTip for HTML Table

5 posts, 0 answers
  1. kumar rangineni
    kumar rangineni avatar
    13 posts
    Member since:
    Dec 2009

    Posted 17 Dec 2009 Link to this post

    hi
    can anyone help me... how to use radtooltip for html table.... onmouseover event i should call Radtooltip....
    please help me
    Thanks
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 18 Dec 2009 Link to this post

    Hello Kumar,

    Use the show() method of RadTooltip client object in the onmouseover event handler.

    aspx:
     
    <table id="tab1" style="border-style: solid; width: 100%; border-color: #008080"  
        onmouseover="tooltip(this);">  
        <tr>  
           . . .  
        </tr>  
    </table> 
    <telerik:RadToolTip ID="RadToolTip2" runat="server" HideDelay="1000" RelativeTo="Mouse"
        Hello World...! 
    </telerik:RadToolTip> 

    javascript:
     
    <script type="text/javascript"
        function tooltip(tab) { 
            var tooltip = $find("<%= RadToolTip2.ClientID%>"); 
            tooltip.set_targetControlID(tab.id); 
            tooltip.show(); 
        } 
    </script> 

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 18 Dec 2009 Link to this post

    Hi Kumar,

    You can use the approach Shinu suggested - it will work OK for your case. However, there are easier ways to achieve what you need, e.g set the TargetControlID of the tooltip to the table element or set title and use the AutoToolTipify functionality. In order to find teh best solution for your particular case, please examine  the qsf demos of the tooltip whcih are available below:

    http://demos.telerik.com/aspnet-ajax/tooltip/examples/overview/defaultcs.aspx


    All the best,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. kumar rangineni
    kumar rangineni avatar
    13 posts
    Member since:
    Dec 2009

    Posted 18 Dec 2009 Link to this post

    thanks for ur reply..... By each row i have to get the id from the table....... for different ids i have to take products from database.....
    plz  reply me soon........
  6. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 19 Dec 2009 Link to this post

    Hello kumar,

    In this case what I can recommend is to use a LOD RadToolTipManager and populate the content by uisng AJAX. As to attaching the tooltips, I believe that the best way to do so is to create the tooltips on the client by uisng teh createToolTip method as shown in the following demos:

    http://demos.telerik.com/aspnet-ajax/tooltip/examples/radtooltipmanagerclientapi/defaultcs.aspx
    http://demos.telerik.com/aspnet-ajax/tooltip/examples/tooltiptreeview/defaultcs.aspx
    http://demos.telerik.com/aspnet-ajax/tooltip/examples/tooltipcalendar/defaultcs.aspx


    Regards,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017