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

Radbutton and Radtooltip Control

3 Answers 149 Views
Button
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 18 Nov 2010, 04:28 PM
Hello
I'm trying the Radbutton control, but reach a point where I use a classic asp button and a control radtooltip to show control user to login, to do with the button shows the classic asp perfect result, but doing so with radbutton control only shows me assigned to the button text.

Code for Asp Clasic
<telerik:RadToolTip ID="RadToolTipLogin" runat="server" HideEvent="ManualClose" TargetControlID="Loginin"
        IsClientID="true" Skin="Windows7" VisibleOnPageLoad="false" ShowEvent="OnClick">
        <Demo:UserLogin ID="WebUserLogin1" runat="server" />
</telerik:RadToolTip>
<asp:Button runat="server" ID="Loginin" Text="Login" />

Code radbutton
<telerik:RadToolTip ID="RadToolTipLogin" runat="server" HideEvent="ManualClose" TargetControlID="Loginin"
        IsClientID="false" Skin="Windows7" VisibleOnPageLoad="false" ShowEvent="OnClick">
        <Demo:UserLogin ID="WebUserLogin1" runat="server" />
</telerik:RadToolTip>
 <telerik:RadButton ID="Loginin" runat="server" Skin="Windows7" Text="Login"    Width="90px" AutoPostBack="false" Icon-PrimaryIconUrl="~/images/lock16.png">
</telerik:RadButton>

Thanks for the help 

Alex.
.co







3 Answers, 1 is accepted

Sort by
0
Damien
Top achievements
Rank 1
answered on 19 Nov 2010, 09:34 AM

Hello Alex,

I have exactly the same problem.

 

I need help too, thanks.

 

Damien

0
Pero
Telerik team
answered on 19 Nov 2010, 02:11 PM
Hello Damien and Alex,

The RadButton control by default renders the Text as ToolTip, if the user has not specified a tooltip. That's why the content of the ToolTip is not shown. We will consider changing this behavior for the next release which is scheduled for mid December.

For the time being use either of the solutions pasted below:

1. In case plain text content needs to be shown with the ToolTip, please set the RadToolTip's Text property and the content will be shown.

2. To show rich content (HTML), you should make sure the ToolTip occurs after the Button on the page (i.e. just below the button), and handle the OnClientLoad event to remove the button's title attribute. Here is a sample showing this:

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <script type="text/javascript">
    </script>
    <telerik:RadButton ID="Loginin" runat="server" Skin="Windows7" Text="Login" Width="90px"
        AutoPostBack="false" ToolTip="HIDE" Icon-PrimaryIconCssClass="rbOk" OnClientLoad="function (button,args){button.get_element().setAttribute('title','');}">
    </telerik:RadButton>
    <telerik:RadToolTip ID="RadToolTipLogin" runat="server" TargetControlID="Loginin"
        IsClientID="false" Skin="Windows7" VisibleOnPageLoad="false">
        Some tooltip content!
    </telerik:RadToolTip>
    </form>
</body>
</html>


Greetings,
Pero
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Damien
Top achievements
Rank 1
answered on 19 Nov 2010, 02:28 PM

Hi Pero,

the problem is solved.

 

thanks a lot

 

Damien

Tags
Button
Asked by
Alex
Top achievements
Rank 1
Answers by
Damien
Top achievements
Rank 1
Pero
Telerik team
Share this question
or