RadToolTipManager hide() problem

3 posts, 0 answers
  1. Mikhail Rabchuk
    Mikhail Rabchuk avatar
    4 posts
    Member since:
    Dec 2007

    Posted 11 Feb 2008 Link to this post

    Hi,
    I have the problem with the js function hide.
    I use RadToolTipManager for display my content

    Page Front End
    <asp:ScriptManagerProxy ID="ListScriptManagerProxy" runat="server"></asp:ScriptManagerProxy> 
     
    <telerik:RadAjaxManagerProxy ID="ListAjaxManager" runat="server"
     
        <AjaxSettings> 
     
            <telerik:AjaxSetting AjaxControlID="UpdateButton" > 
     
                <UpdatedControls> 
     
                    <telerik:AjaxUpdatedControl ControlID="ListEditorPanel" LoadingPanelID="ListAjaxLoadingPanel" /> 
     
                </UpdatedControls> 
     
            </telerik:AjaxSetting> 
     
        </AjaxSettings> 
     
    </telerik:RadAjaxManagerProxy> 
     
    &nbsp; 
     
    <telerik:RadToolTipManager ID="EditItemToolTipManager" runat="server" ShowEvent="OnClick" 
     
            Skin="Vista" Position="MiddleRight" RelativeTo="Element" ManualClose="true"  onajaxupdate="EditItemToolTipManager_OnAjaxUpdate" > 
     
    </telerik:RadToolTipManager> 
     
         
     
    &nbsp; 
     
    <div style="width:200px"
     
        <telerik:RadAjaxLoadingPanel ID="ListAjaxLoadingPanel" runat="server" > 
     
                    <asp:Image ID="Image1" runat="server" AlternateText="Loading..."  
     
                        ImageUrl="~/RadControls/Ajax/Skins/Default/Loading.gif" /> 
     
        </telerik:RadAjaxLoadingPanel> 
     
        <asp:LinkButton runat="server" ID="NewItemButton">Add New </asp:LinkButton> 
     
        <asp:Panel runat="server" ID="ListEditorPanel"
     
            Some content will be here 
     
        </asp:Panel> 
     
    </div> 
     
    <asp:Panel runat="server" Visible="false" ID="EditItemPanel"
     
            <br /> 
     
            <asp:Panel runat="server" ID="EditControlPanel"
     
            </asp:Panel> 
     
            <asp:Button runat="server" ID="UpdateButton" Text="Update" OnClick="UpdateButton_Click" /> 
     
            <asp:Button runat="server" ID="DeleteButton" Text="Delete" OnClick="DeleteButton_Click" /> 
     
            <asp:Button runat="server" ID="CancelButton" Text="Cancel" /> 
     
    </asp:Panel> 

    Page Back End

    public partial class ListManager : System.Web.UI.UserControl 
        protected void Page_Load(object sender, EventArgs e) 
        {    
            HookupScripts(); 
            EditItemToolTipManager.TargetControls.Add(NewItemButton.ClientID, true); 
        } 
     
        private void HookupScripts() 
        { 
            // Get a ClientScriptManager reference from the Page class. 
            ClientScriptManager cs = Page.ClientScript; 
            // Check to see if the include script exists already. 
            if (!cs.IsClientScriptIncludeRegistered(csname)) 
            { 
                cs.RegisterClientScriptInclude(cstype, csname, ResolveClientUrl(csurl)); 
            } 
            UpdateButton.OnClientClick = "HideTooltip(\"" + EditItemToolTipManager.ClientID + "\")"
            CancelButton.OnClientClick = "HideTooltip(\"" + EditItemToolTipManager.ClientID + "\")"
        } 

    I have registered js file

    function HideTooltip(tooltipClientId) 
         var tooltip = $find(tooltipClientId); 
         alert(tooltip.isVisible()); 
         tooltip.hide(); 

    When I click at NewItemButton page displays me tooltip, but when i click CancelButton alert window returns me "false" and tooltip does not hide.

    How this problem can be resolved?


  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 12 Feb 2008 Link to this post

    Hello Mikhail Rabchuk,
    The problem comes from the fact the you try to hide the RadToolTip manager and not a RadToolTip. You can get a reference to the active tooltip (the one that is currently visible), by using the get_ActiveToolTip client method of the Telerik.Web.UI.RadToolTipController instance. Please refer to our online documentation for details.

    All the best,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Mikhail Rabchuk
    Mikhail Rabchuk avatar
    4 posts
    Member since:
    Dec 2007

    Posted 13 Feb 2008 Link to this post

    Thank you. I have resolved my problem.
Back to Top