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

How to implement dynamic tooltip?

8 Answers 336 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Ryan C
Top achievements
Rank 1
Ryan C asked on 16 Oct 2009, 02:39 PM

How would you go about creating dynamic tooltips such as the ones found here:
http://freelance.geekinterview.com/143141-issues-with-jquery-cluetip.html

Basically I got a glossary table in my database with definitions that I want to display as a tooltip in my aspx (c#) pages wherever the a keyword will match that of the glossary..

Something basic will do, such as:
http://plugins.learningjquery.com/cluetip/demo/

8 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 19 Oct 2009, 07:46 AM
Hello Ryan,

You can refer to the following online demos which illustrate with examples different scenarios of displaying RadToolTips. Probably this should help you get started:
RadToolTip
Tooltipify Specific Area

Thanks
Princy.
0
Ryan C
Top achievements
Rank 1
answered on 19 Oct 2009, 08:37 AM
Thanks. Was wondering if Telerik had something ready. I can try to develop something myself, but I'm predicting that I will have a performance issue.
0
Svetlina Anati
Telerik team
answered on 21 Oct 2009, 12:13 PM
Hi Ryan C,

The RadToolTip provides functionality which offers dynamic creation of tooltips both on the server and on the client.

1) To create a RadToolTip on the server you should use the standard approach you use to dynamically create controls, e.g :


RadToolTip tooltip = new RadToolTip();
tooltip.TargetControlID = myTargetControlID;
//set different properties here
this.form1.Controls.add(tooltip);

2) To create a tooltip on the client you should use the RadToolTipManager's client API and its createToolTip() method which demonstrated in the demo below:

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

Since there is ability to create and configure tooltips both on the server and on the client and also to configure them, we believe that this is teh basic needed functionality a control should offer as a built-in functionality. If you expect another built-in functionality, please provide detailed explanations and in case we fpund it useful in enough scenarios and basic enough, we can consider it as a feature request and we can implement it.

Sincerely yours,
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
Ryan C
Top achievements
Rank 1
answered on 21 Oct 2009, 12:31 PM
Thanks for the detailed reply. It is still not straight forward as I hoped it to be.

For future releases the explanation of what I wanted can be read below:

For dynamic websites I usually serve one template aspx page which shows the content from the database by passing on the id of that content. The administrator of the site can manipulate the content as he/she likes through a custom page using the HTML editor.
Now in this particular case this website also has a glossary, which the terms & definitions is being manipulated onto a table in the database. What I was looking for is to display a tooltip for each term matching the glossary on the page dynamically.

0
Svetlina Anati
Telerik team
answered on 26 Oct 2009, 09:08 AM
Hi Ryan C,

As far as I understand your scenario is too specific to implement it as an embedded functionality. Furthermore you are the first one who has such a request for a feature. The controls offer a very rich API which provides teh ability to implement a lot of particular scenarios and we do not intend to implement so specific functionality if we do not have a lot of customers requests.

Please, use the API of the control to achieve what you need and in case you experience problems, do not hesitate to contact us again!

Greetings,
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
dimiter
Top achievements
Rank 1
answered on 27 Oct 2009, 01:49 PM
Hi Svetlina

I am trying to create tooltip dynamically, but I failed an exception was thrown 
Script control 'TT_1' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().

here is my code maybe i am wrong:

Telerik.Web.UI.RadToolTip TT =

new Telerik.Web.UI.RadToolTip();

 

TT.Width = 240;

TT.Height = 130;

TT.OffsetX = 5;

TT.Style.Add(

"background", "url(../../App_Themes/Theme_1280/Images/tooltip.jpg) no-repeat");

 

TT.TargetControlID =

"cell_1" ;

 

TT.Position = Telerik.Web.UI.ToolTipPosition.MiddleRight;

TT.HideEvent = Telerik.Web.UI.ToolTipHideEvent.LeaveTargetAndToolTip;

TT.ID =

"TT_1" ;

 

TT.Controls.Add(table);

Cell.Controls.Add(TT);

 

greetings
Dimiter

 

0
Svetlina Anati
Telerik team
answered on 29 Oct 2009, 03:40 PM
Hello dimiter,

The only thing I can assume without having your code is that you have missed to declare a ScriptManager before teh tooltip is added to the page. If so, please note that script controls should be registered in the ScriptManager and this is the most probable reason for this error. Another option is that you are adding the tooltip in some event which is not suitable considering the page lifecycle but I cannot tell you the exact reason until I am able to see what is actually goind on.

This being said, if the problem persists, please provide code on base of which a fully runnable reproduction page could be created and I will do my best to help.

Best wishes,
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
Royce
Top achievements
Rank 1
answered on 04 May 2013, 10:53 AM

For display custom tooltip on custom dropdown, get the help from following link. I hope it resolve your problem

http://www.mindstick.com/Articles/30062a03-ee92-40bb-bb7e-d9be0a666855/?Dynamic%20Tooltip%20on%20Custom%20Dr
Tags
ToolTip
Asked by
Ryan C
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Ryan C
Top achievements
Rank 1
Svetlina Anati
Telerik team
dimiter
Top achievements
Rank 1
Royce
Top achievements
Rank 1
Share this question
or