closing tooltip server-side

2 posts, 0 answers
  1. dhlennon
    dhlennon avatar
    32 posts
    Member since:
    Oct 2006

    Posted 18 Apr 2008 Link to this post

    Is it possible to close a modal tooltip from server-side (using RegisterClientScriptBlock I guess) in VB?
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 25 Apr 2008 Link to this post

    Hello David,

    Yes, it is possible to close the opened tooltip through executing script server-side.

    In order to do this I suggest you add the following javascript function in your aspx page:

     function CloseActiveToolTip()  
            {   
                setTimeout(function(){   
                    var controller = Telerik.Web.UI.RadToolTipController.getInstance();  
                    var tooltip = controller.get_activeToolTip();  
                    if (tooltip) tooltip.hide();  
                }, 1000); 

    Then, you can execute it server-side by using the following code line in the cs file:

    ClientScript.RegisterStartupScript([GetType](), "closeActiveTip"" CloseActiveToolTip();")  
     

    Please, note that depending on your scenario it may be necessary to use the ScriptManager's ResponseScripts collection and add the script in an analogous manner.


    Sincerely yours,
    Svetlina
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top