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

RadToolTip for HTML Table

4 Answers 153 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
kumar rangineni
Top achievements
Rank 1
kumar rangineni asked on 17 Dec 2009, 03:52 PM
hi
can anyone help me... how to use radtooltip for html table.... onmouseover event i should call Radtooltip....
please help me
Thanks

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 18 Dec 2009, 10:48 AM
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.
0
Svetlina Anati
Telerik team
answered on 18 Dec 2009, 12:03 PM
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.
0
kumar rangineni
Top achievements
Rank 1
answered on 18 Dec 2009, 02:20 PM
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........
0
Svetlina Anati
Telerik team
answered on 19 Dec 2009, 12:05 PM
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.
Tags
ToolTip
Asked by
kumar rangineni
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Svetlina Anati
Telerik team
kumar rangineni
Top achievements
Rank 1
Share this question
or