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

Too much tooltip

17 Answers 359 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Henrik Brinch
Top achievements
Rank 2
Henrik Brinch asked on 08 Aug 2007, 07:16 PM
I use the RadToolTipManager and add specifically those control I want tooltips for, but I get too much tooltips!   E.g. I have a RadCalendar control which the ToolTipManager obvisiously thinks should be tooltipified ... is this a feature or a bug?

How do one work-around this?

17 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 09 Aug 2007, 06:24 AM
Hello Henrik Brinch,
I tested your scenario with a simple page but could not reproduce the problem. Could you please prepare and send us a simple running project, demonstrating this issue?

Greetings,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Peter
Top achievements
Rank 1
answered on 20 Aug 2007, 02:11 AM
I'm experiencing the same problem.  I have a RadToolTipManager on a master page, and my pages find the tool tip manager and add the target controls in the code-behind.  The problem is more severe on pages that have no target controls, but seems somewhat random. 

I'm loading the contents on demand.  It doesn't try to give me a tooltip on every control on the page, but it does seems to come up for most of them.  On a few controls it comes up on, it doesn't get to the AjaxUpdate call at all, instead I get

"The given key was not present in the dictionary"

0
Tsvetie
Telerik team
answered on 20 Aug 2007, 08:20 AM
Hi Peter,
I am not sure what the problem might be, until I have a look at your code. Therefore, could you please prepare and send us a simple running project, that demonstrates these issues?

Best wishes,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Henrik Brinch
Top achievements
Rank 2
answered on 20 Aug 2007, 08:46 AM
Phew... extremely happy that I'm not the only one experiencing this problem!

I've not yet been able to produce a simple example, because my problem is part of a more advanced dynamic creation process of the pages.

However it seems that the AjaxUpdate call for the tooltip is called e.g. when opening a popup calender and hovering over a day.   There is no connection between the calender and the tooltipmanager (e.g. no ID's have been added) - but somehow the TooltipManager thinks it should display tooltips.

I will try to see if I can make a simple example on the problem.
0
Tsvetie
Telerik team
answered on 20 Aug 2007, 09:26 AM
Hi Henrik Brinch,
It would be great if we can have a project, with which we can investigate the case. Do take your time. Once we have the project, we will do our best to provide a solution as soon as possible.

Greetings,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Peter
Top achievements
Rank 1
answered on 23 Aug 2007, 06:16 PM
I've found a reproducible case in my project and a workaround.

The situation is that there is a RadToolTipManager in my master page, and the individual pages add the targets.  That works great on pages where there are targets, but the bug comes up on pages with no targets.  So I added a dummy control with a style of display:none on the master page and added that as a target all the time.  Once I did that the extra popups went away.  I don't know if this is comprehensive or an accident of my particular project - I haven't had time to create a simple test project to find out. 
0
Henrik Brinch
Top achievements
Rank 2
answered on 24 Aug 2007, 08:26 AM

Great Peter,

Of course this is exactly what I'm experiencing - only on pages without tooltips.   The following code easily reproduces the problem, now try using the calendar combo ... you will notice the problem:

using System;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using Telerik.Web.UI;  
using Telerik.WebControls;  
 
public partial class DefaultTooltip : System.Web.UI.Page  
{  
  private RadToolTipManager _tooltipManager;  
 
  protected void Page_Load(object sender, EventArgs e)  
  {  
    RadDatePicker picker = new RadDatePicker();  
      
    picker.ID = "cal";  
    picker.EnableViewState = true;  
    this.Panel1.Controls.Add(picker);  
 
    Label testLabel = new Label();  
    testLabel.ID = "testlabel";  
    testLabel.Text = "Here some text that needs a tooltip!";  
      
    this.Panel1.Controls.Add(testLabel);  
 
    //  When adding the control, with tooltip it works!  
    //_tooltipManager.TargetControls.Add("testlabel");  
  }  
 
  protected override void OnInit(EventArgs e)  
  {  
    ScriptManager scriptManager = new ScriptManager();  
    scriptManager.ID = "ScriptManager";  
 
    this.Panel1.Controls.Add(scriptManager);  
 
    _tooltipManager = new RadToolTipManager();  
    _tooltipManager.ID = "ToolTipManager";  
    _tooltipManager.AutoCloseDelay = 0;  
    _tooltipManager.AjaxUpdate += new ToolTipUpdateEventHandler(mngr_AjaxUpdate);  
 
    this.Panel1.Controls.Add(_tooltipManager);  
 
    base.OnInit(e);  
  }  
 
  private void mngr_AjaxUpdate(object sender, ToolTipUpdateEventArgs e)  
  {  
    if(e.TargetControlID == "testlabel")  
    {  
      Label tooltipLabel = new Label();  
      tooltipLabel.Text = "Here my tooltip text!!!";  
 
      e.UpdatePanel.ContentTemplateContainer.Controls.Add(tooltipLabel);  
    }  
  }  
}  
 
0
Tsvetie
Telerik team
answered on 27 Aug 2007, 11:07 AM
Hello Henrik Brinch,
Actually, this behavior is by design - in case the TargetControls collection of the RadToolTipManager is empty, the manager tooltipifies all elements that have a Title/ToolTip attribute. In case you do not want to use this feature, and for example, want to add an ID at a later stage, you can add a ClientID that does not match the ClientID of any control on the page to the TargetControls collection. That way, the collection will never be empty and you will get the desired behavior.

Sincerely yours,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Todd Anglin
Top achievements
Rank 2
answered on 06 Sep 2007, 11:37 PM
Tsvetie-

I ran in to this problem on a sample project, too. It seems like the only way to prevent his behavior is a bit of a hack (adding the dummy id). Why not simply add a property to the ToolTipManager that allows developers to disable the automatic "tooltipifying" in those cases where the developers always want explicit control over where a RadToolTip renders? Something like "EnableAutomaticTips". That would be a more elegant approach than the dummy id hack and would help a lot of developers. :)

-Todd
0
Tsvetie
Telerik team
answered on 07 Sep 2007, 10:09 AM
Hi Todd Anglin,
Thank you for sharing this idea, I will forward it to our developers for consideration.

All the best,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
James
Top achievements
Rank 2
answered on 13 Nov 2007, 09:15 PM
Yea I have been getting random crashes on my site for a while now and could never reproduce it. Finally I saw this thread..
I would definitely say it's a bad idea to have this feature off by default!
0
Tsvetie
Telerik team
answered on 14 Nov 2007, 07:47 AM
Hello Morgan,
First I would like to point out that the Visible property does the job of the EnableAutomaticTips property that Todd suggested. That is why, in case you do not want the RadToolTipManager to tooltipify everything on the page, until you add some IDs to its TargetControls collection, you could set its Visible property to false initially.

However, I do not agree with you that in case you have added a RadToolTipManager to a page and its TargetControls collection is empty, the manager should not tooltipify anything. The main idea behind the manager is to be used in scenarios where many elements would require a tooltip and as you have added it to the page, it is more natural to expect something to be tooltipified. After all, you could as well add the manager dynamically, just when you need it to start tooltipifying.

However, we are open for other points of view on this topic. Should more people expect a manager with an empty TargetControls collection to do nothing, we will consider changing its behavior.

Sincerely yours,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jeremy Hinkle
Top achievements
Rank 1
answered on 13 Feb 2008, 12:31 AM
We would like to see a parameter to disable this 'feature' as well.  We dynamically add ALL of our tooltips to the manager, one dozens of pages, and in the even there is no object on the page that has a tooltip added to the manager, the whole page becomes a freaky tooltip mad house. 

We want to disable this annoying 'feature' of tooltip manager.  Please let us!

Unfortunately, tooltip manager has many more uses other than the situation you describe above, and when it's used in a way other than the 'auto tooltipification' way, the auto tooltipification is extremely annoying.
0
Todd Anglin
Top achievements
Rank 2
answered on 13 Feb 2008, 01:06 AM
Margaret-

Thanks for the feedback. I think this strengthens the case for adding the EnableAutomaticTips property to the ToolTipManager since it highlights a problem with using the Visible property.

If you use the Visible property, you have to manually add code to your pages that use the ToolTipManager to check the TargetControls collection size and manually adjust the visible property accordingly. If a EnableAutomaticTips property were available, you could simply set this property to "False" and the Manager would automatically set the Visible property to false if the TargetControls collection were empty.

And so long as the AutoTips property defaults to true, it won't affect the Manager's behavior for existing implementations (since you'd have to "opt-in" to the new feature). Hopefully we'll see this enhancement soon.

-Todd
0
Tervel
Telerik team
answered on 15 Feb 2008, 04:49 PM
Hello,

We will add a property to the RadToolTipManager AutoTooltipify (default value = true).
When setting it to false, the tooltip manager won't tooltipify anything on the page if its TargetControls collection is empty.

The property will be included in the Q1 Prometheus release scheduled for April.

All the best,
Tervel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
AAA
Top achievements
Rank 1
answered on 17 Mar 2008, 06:30 PM
Thank you Peter for that soln....I had a tough time figuring out what was up with the tooltip. I added a dummy div item to the tooltip manager like you said and it worked fine.

I guess this wouldn't be a problem after the new release is out in April.
0
Tervel
Telerik team
answered on 18 Mar 2008, 08:52 AM
Hi,

The latest update available for download (e.g. Prometheus Q3 SP2) already features the property AutoTooltipify, so you can use it even now and do not need to wait till April.


Best regards,
Tervel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ToolTip
Asked by
Henrik Brinch
Top achievements
Rank 2
Answers by
Tsvetie
Telerik team
Peter
Top achievements
Rank 1
Henrik Brinch
Top achievements
Rank 2
Todd Anglin
Top achievements
Rank 2
James
Top achievements
Rank 2
Jeremy Hinkle
Top achievements
Rank 1
Tervel
Telerik team
AAA
Top achievements
Rank 1
Share this question
or