7 Answers, 1 is accepted
0
Hello daviddam,
You need to get the client IDs for the toolbar buttons and add them in the target collection:
Getting the ClientIDs for the RadToolBar buttons can also be done on the server in order to avoid searching for the exact id of the rendered element.
All the best,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
You need to get the client IDs for the toolbar buttons and add them in the target collection:
<telerik:RadToolTipManager Position="BottomRight" ID="RadToolTipManager1" runat="server"> |
<TargetControls> |
<telerik:ToolTipTargetControl IsClientID="true" TargetControlID="Radtoolbar1_tlbb1" /> |
<telerik:ToolTipTargetControl IsClientID="true" TargetControlID="Radtoolbar1_tlbb2" /> |
<telerik:ToolTipTargetControl IsClientID="true" TargetControlID="Radtoolbar1_tlbb3" /> |
</TargetControls> |
</telerik:RadToolTipManager> |
<radTlb:RadToolbar runat="server" ID="Radtoolbar1"> |
<Items> |
<radTlb:RadToolbarButton ID="tlbb1" ToolTip="New (Alt+N)" CommandName="New" /> |
<radTlb:RadToolbarButton ID="tlbb2" ToolTip="Open (Alt+O)" CommandName="Open" /> |
<radTlb:RadToolbarButton ID="tlbb3" ToolTip="Save (Alt+S)" CommandName="Save" /> |
</Items> |
</radTlb:RadToolbar> |
Getting the ClientIDs for the RadToolBar buttons can also be done on the server in order to avoid searching for the exact id of the rendered element.
All the best,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
daviddam
Top achievements
Rank 1
answered on 01 Nov 2007, 05:10 PM
How do I get the ClientID for the ToolbarButtons? I am creating the buttons programmatically and then add them to the Toolbar. The problem I am having is that once I create the button, the ClientID is null.
Any ideas?
Any ideas?
0
Hello daviddam,
I've attached to this thread a small sample that shows how to achieve the desired scenario. Use it as a base and extend it further so it fits your requirements.
Best wishes,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
I've attached to this thread a small sample that shows how to achieve the desired scenario. Use it as a base and extend it further so it fits your requirements.
Best wishes,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
daviddam
Top achievements
Rank 1
answered on 06 Nov 2007, 06:38 PM
Thank you for the sample project. However, my problem still exists. Here is a snippet of the code. It is very similar to the code attached to this post. However, if I put a breakpoint on the last line, button.ClientID is null so it does not find the control on the client side and I get the standard tooltip over the buttons rather than the fancy Telerik tooltip. Is one of the settings below causing this problem?
Thanks!
Thanks!
RadToolbarButton button = new RadToolbarButton(); |
button.EnableViewState = false; |
button.CommandName = "help" + kvp.Key; |
button.ButtonImage = "../../../../../Images/widget-help.gif"; |
button.DisplayType = RadToolbarButton.ButtonDisplayType.ImageOnly; |
string tip = dtWidgets.DefaultView[0]["description"].ToString(); |
button.ToolTip = tip; |
kvp.Value.Items.Add(button); |
this.RadToolTipManagerHelp.TargetControls.Add(kvp.Value.ClientID + "_" + button.ClientID, true); |
0
Hello daviddam,
Please note that in our sample the ID of each button is set explicitly - e.g.
but.ID = "TLBBUT_" + counter;
while in your code no such thing occurs - hence the problem you encoutner.
Greetings,
Tervel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Please note that in our sample the ID of each button is set explicitly - e.g.
but.ID = "TLBBUT_" + counter;
while in your code no such thing occurs - hence the problem you encoutner.
Greetings,
Tervel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
AJ
Top achievements
Rank 1
answered on 11 Dec 2007, 01:47 PM
Hi Georgi,
I've this set up declaratively as you have. The problem I'm seeing is that both tooltips appear; the new RadTooltip and the old RadToolbarbutton tooltip.
Is there anyway to kill the old one?
thanks
Alan
I've this set up declaratively as you have. The problem I'm seeing is that both tooltips appear; the new RadTooltip and the old RadToolbarbutton tooltip.
Is there anyway to kill the old one?
thanks
Alan
0
Hi Alan,
This can be fixed with a small hack - please find attached the modified example to my post. We will improve the behavior of the RadToolBar control in one of the following releases and then this code will not be needed.
Sincerely yours,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
This can be fixed with a small hack - please find attached the modified example to my post. We will improve the behavior of the RadToolBar control in one of the following releases and then this code will not be needed.
Sincerely yours,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center