Tooltip show on Blur

5 posts, 0 answers
  1. Feizal Amlani
    Feizal Amlani avatar
    91 posts
    Member since:
    Feb 2007

    Posted 07 Jun 2010 Link to this post

    Hello,

    I am looking for an example where I can show a tooltip when I leave a textbox.  (onblur)

    I have a tooltip defined as in one of your examples.  However, it fires onmouseover.  How do I change to have control on when it fires.
     

    <telerik:RadToolTip ManualClose="true"
    ID="RadToolTip1"
    Skin="Vista"
    runat="server"
    TargetControlID="txtPartyName">
    Rich content:
    <asp:Button ID="btnA" runat="server" Text="Button in a ToolTip"/>
    </telerik:RadToolTip>

    <asp:TextBox ID="txtPartyName" runat="server" onblur=????></asp:TextBox>

    Thanks,
    Feizal

     

     

     

     

     

     

     

     

     

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 08 Jun 2010 Link to this post

    Hello Faizal,

    It is doable from client code. Access the client object of RadToolTip in onblur event and invoke the show() method.

    code:
     
    <telerik:RadToolTip ManualClose="true" ShowEvent="FromCode" ID="RadToolTip2" Skin="Vista" 
        runat="server" TargetControlID="txtPartyName">  
        Rich content:  
        <asp:Button ID="btnA" runat="server" Text="Button in a ToolTip" /> 
    </telerik:RadToolTip> 
    <asp:TextBox ID="txtPartyName" runat="server" onblur="showToolTip();"></asp:TextBox> 
     
    <script type="text/javascript">  
        function showToolTip() {  
            var tooltip = $find('<%= RadToolTip2.ClientID %>');  
            tooltip.show();  
        }  
    </script> 


    Cheers,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Feizal Amlani
    Feizal Amlani avatar
    91 posts
    Member since:
    Feb 2007

    Posted 08 Jun 2010 Link to this post

    Thanks Princy,

    That worked fine.  However, I have set the tooltip with the following properites...

    <telerik:RadToolTip ManualClose="true" ID="RadToolTip1" Skin="Vista" runat="server" Width="250px" Height="100px" Animation="Slide"
         RelativeTo="Element" ShowCallout="true" TargetControlID="txtPartyName" Position="BottomCenter" ShowEvent="FromCode"
         Title="Similar Party Matches(tr)">
        <br />
        <asp:Label runat="server" Text="Similar Party Matches(tr)" ID="lblSimilarPartyMatches"></asp:Label>
    </telerik:RadToolTip>

    It seems when the tooltip opens it display away from the Element and then quickly puts itself into position under the element which is the intended behaviour.  The tooltip jumps from one location to the correct location under the element.  Any ideas what is causing this?

    Thanks,
    Feizal
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 09 Jun 2010 Link to this post

    Hello Faizal,

    I am not sure about the behaviour that you described. The code worked well in my end (my RadControls version - 2010, 1, 309). Can someone from Telerik give us a hand?

    Thnaks,
    Princy.


  6. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 10 Jun 2010 Link to this post

    Hello guys,

    I also tested the code and it worked fine on my side as well with the version you have selected - 2010.1.519. What I can assume is that the issue comes from parent elements of the tooltip and if this is the case I recommend to set RenderInPageRoot="true" and test again. More information about this property is available below:

    http://demos.telerik.com/aspnet-ajax/tooltip/examples/tooltipasformchild/defaultcs.aspx

    In case this does not help, please prepare a fully runnable page, open a new support ticket and send it to me and I will do my best to help.

    Best wishes,
    Svetlina
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017