Hi,
I'm having problems to set the tooltip of a button in the RadToolbar on the client side. I have to add buttons to a dropdown item in a toolbar, and I wanted to set the tooltip, but somehow, the set_toolTip function is not working.
Here is the code I'm using:
Maybe I'm missing something?
Thanks,
Eduardo
I'm having problems to set the tooltip of a button in the RadToolbar on the client side. I have to add buttons to a dropdown item in a toolbar, and I wanted to set the tooltip, but somehow, the set_toolTip function is not working.
Here is the code I'm using:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="toolbarThinLastButton.aspx.cs" Inherits="toolbarThinLastButton" %> |
<%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
<html xmlns="http://www.w3.org/1999/xhtml" > |
<head runat="server"> |
<title>Untitled Page</title> |
<script type="text/javascript"> |
function Clicked() { |
var taskbar = $find("RadToolBar1"); |
var dd = taskbar.findItemByText("xxx"); |
taskbar.trackChanges(); |
var dropDownChildButton = new Telerik.Web.UI.RadToolBarButton(); |
dropDownChildButton.set_text("a button"); |
// Tooltip |
dropDownChildButton.set_toolTip("bla bla bla"); |
dd.get_buttons().add(dropDownChildButton); |
taskbar.commitChanges(); |
} |
</script> |
</head> |
<body> |
<form id="form1" runat="server"> |
<asp:ScriptManager ID="scriptManager1" runat="server" /> |
<div> |
<telerik:RadToolBar ID="RadToolBar1" runat="server" Skin="Office2007" OnClientButtonClicked="Clicked"> |
<Items> |
<telerik:RadToolBarButton Text="button 1" /> |
<telerik:RadToolBarButton Text="button 2" /> |
<telerik:RadToolBarButton Text="button 3" /> |
<telerik:RadToolBarDropDown Text="xxx"> |
<Buttons> |
<telerik:RadToolBarButton Text="add or remove buttons" ToolTip="click me"> |
</telerik:RadToolBarButton> |
</Buttons> |
</telerik:RadToolBarDropDown> |
</Items> |
</telerik:RadToolBar> |
</div> |
</form> |
</body> |
</html> |
Maybe I'm missing something?
Thanks,
Eduardo