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

RadToolTip and RadMaskedTextBox

1 Answer 142 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Benigno Benavides Siller
Top achievements
Rank 1
Benigno Benavides Siller asked on 25 Sep 2007, 06:13 PM
Hi!

Can I use a RadToolTip with RadMaskedTextBox?

I have this code:

....

<td>

<telerik:RadMaskedTextBox ID="txtValue" Mask="####-####-####-####" onBlur="HideToolTip()" runat="server">

</telerik:RadMaskedTextBox>

<telerik:RadToolTip ID="RadToolTip1" TargetControlID="txtValue" IsClientID="true" ShowEvent="OnFocus" Sticky="true" Animation="Fade" Position="MiddleRight" RelativeTo="Element" Text="Hello" Skin="Telerik" runat="server">

</telerik:RadToolTip>

</td>

..............



And the function in javascript is:

function HideToolTip(){

var tooltip = $find("RadToolTip1");

tooltip.hide();

}


When I use a simple textBox this code works, but when I use the RadMaskedTextBox  the RadToolTip doesn't appear.

Any help?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 26 Sep 2007, 06:20 AM
Hi Benigno,

In this specific case - when using RadInput, you will need to use the ClientID of the textbox / numeric textbox plus "_text" - this is how the RadNumericTextBox, RadTextBox and RadMaskedTextBox  are rendered on the client.
e.g.:
 <telerik:RadMaskedTextBox   
        ID="txtValue"   
        Mask="####-####-####-####"   
        onBlur="HideToolTip()"   
        runat="server">  
    </telerik:RadMaskedTextBox> 
    <telerik:RadToolTip   
        ID="RadToolTip1"   
        TargetControlID="txtValue_text"   
        IsClientID="true"   
        ShowEvent="OnFocus"   
        Sticky="true"   
        Animation="Fade"   
        Position="MiddleRight"   
        RelativeTo="Element"   
        Text="Hello"   
        Skin="Telerik"   
        runat="server">  
    </telerik:RadToolTip> 

We will improve on this in a future version of the controls, however for now, you will need to use the approach above.



All the best,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ToolTip
Asked by
Benigno Benavides Siller
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or