RadToolTip and RadMaskedTextBox

2 posts, 0 answers
  1. Benigno Benavides Siller
    Benigno Benavides Siller avatar
    14 posts
    Member since:
    Jul 2006

    Posted 25 Sep 2007 Link to this post

    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.

  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 26 Sep 2007 Link to this post

    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
Back to Top