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

Can RadToolTipManager show different tooltip title's for target controls?

3 Answers 161 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
surender
Top achievements
Rank 1
surender asked on 01 Apr 2008, 12:12 PM

I am using the RadToolTipManager to display tooltips for grid rows. the tooltip title is not same for all the rows.
If the RadToolTipManager.Title is set then tooltip title is same for all the target controls.
RadToolTipManager.TargetControls.Add() function takes only controlID and tootip.
no overloaded fucntion takes the tooltip tile.

How can RadToolTipManager show different tooltip title's  for target controls?
I don't want to use ajax update panel callbacks for the same due to performance reasons.

3 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 03 Apr 2008, 11:57 AM
Hi surender,

I am not quite sure why you need to change the tooltip's title because you can simply add the desired title when you update the information in your tooltip - there is no visual difference.

You can change the tooltip's title for every different row (target element) by using the RadToolTipManager's API. One demonstrative function is the following one:

 <script type="text/javascript">  
        var counter = 0;  
        function BeforeShow(sender, args)  
        {  
          counter++;  
          sender.set_Title("Title" + counter);  
        } 


  <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" OnAjaxUpdate="OnAjaxUpdate" Position="BottomRight" OnClientBeforeShow="BeforeShow">  
            </telerik:RadToolTipManager> 
 

That's the way to dynamically change the tooltip's title. Feel free to modify it in order to meet your requirements.


Greetings,
Svetlina
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
surender
Top achievements
Rank 1
answered on 04 Apr 2008, 12:33 PM
Thanks Svetlina for reply but this does not help us.
Because the tooltip title is set at server side and its having different font.

I tried to set the tooltip content like
  e.Item.ToolTip = "<div class="ToolTipTitlebar" + toolTipTitleString + "</div> <br/>" + toolTipString;                  
                
in the UI, the
toolTipString does not start from line starting.

your help is highly appreciated to solve this.

Here is another sample  (Tried with vista skin) to repro the same:
   <asp:Button ID="Button1" runat="server" Text="Calculate Interest" ToolTip="<div class='ToolTipTitlebar'> <img src='users.jpg' alt='Image'/> How to manage managers </div> <br/> <b>Date:</b> 07/09/08 3:00 - 4:00 PM" Width="100px" />
   

0
Svetlina Anati
Telerik team
answered on 07 Apr 2008, 05:03 PM
Hello Surender,

As far as I understand you want to determine the RadToolTip's title value server-side and then set it on the proper tooltip. If my assumptions are correct I suggest to upgrade to our "Futures" build because there are significant improvements in the RadToolTip's implementation. One of them is that a new overloaded method when adding target controls to the RadToolTipManager is available and it takes one additional parameter called value.

I suggest using it for passing the title's value. In case you experience problems in implementation, please open a new support ticket and send us what you have done so far with a detailed explanation of the desired behavior. Once we receive it we will do our best to help you.

Best regards,
Svetlina
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ToolTip
Asked by
surender
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
surender
Top achievements
Rank 1
Share this question
or