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

AjaxUpdate not firing

1 Answer 99 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Feizal Amlani
Top achievements
Rank 1
Feizal Amlani asked on 14 Apr 2009, 10:13 PM
Hello,

I am looking at one of your examples at: http://demos.telerik.com/aspnet-ajax/tooltip/examples/tooltiptreeview/defaultcs.aspx

There are some slight minor changes to what I am trying to achieve.  I have a TreeView and a ToolTip Manager.  When the user chooses a context menu item from the TreeView, I would like to show a Tooltip and load a UserControl.  This is very similar to what you have demonstrated but the AjaxUpdate is not firing.  

ASPX Page

 

<asp:ScriptManager runat="server" ID="ScriptManager1" />

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">

<telerik:RadTreeView runat="server" ID="PHTreeView" CheckBoxes="true"
OnClientContextMenuItemClicked="RadTree_ContextMenuItemClick">
</telerik:RadTreeView>

<telerik:RadToolTipManager Width="215px" Skin="Sunset" Height="260px" HideDelay="1"
RelativeTo="Element" ID="PHToolTipMgr" runat="server" OffsetX="15" Position="MiddleRight"
OnAjaxUpdate="PHToolTipMgr_AjaxUpdate">
</telerik:RadToolTipManager>

</telerik:RadAjaxPanel>

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

<script language="javascript">

function RadTree_ContextMenuItemClick(sender, eventArgs)
{
    var nodeElem= eventArgs.get_node();

    if(nodeElem.get_level() != 0)
    {

       var node = nodeElem.get_textElement();
       var tooltipManager = $find("<%= PHToolTipMgr.ClientID %>");

        if (!tooltipManager) return;

        var tooltip = tooltipManager.getToolTipByElement(node);

        if (!tooltip)

        {

            tooltip = tooltipManager.createToolTip(node);
            tooltip.set_value(nodeElem.get_value());
            tooltip.show();

        }
     }

}

</script>
 

</telerik:RadCodeBlock>

For the VB file, I am building the Tree from an XML String.  Also, I am not setting the TargetControls property of the Tooltip Manager Control.  Although, I have tried it and makes no difference.   When choosing a context menu the PageLoad does fire but the following does not fire.  I was hoping to load a usercontrol in the AjaxUpdate method.

 

 

 

 

Public Sub PHToolTipMgr_AjaxUpdate(ByVal sender As Object, ByVal e As Telerik.Web.UI.ToolTipUpdateEventArgs) Handles PHToolTipMgr.AjaxUpdate
 

 

 

 

Thanks for you help.


 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 16 Apr 2009, 03:28 PM
Hi Feizal,

I am not quite sure why there is a postback in your case since in the code you have provided you have not subscribed to the server ContextMenuClick event. In case you have or you perform a postback in another manner, you should prevent this to happen. Note, also, that with the provided code you actually tooltipify the node and not the menu item - in case you want to tooltipify the menu item itself, you should provide it to the createTooltip method - you can extract it by using the get_menuItem() instead of get_node() method.

If the problem persists, please prepare a sample, fully runnable reproduction demo, open a new support ticket and send it to us along with detailed explanations of the actual and the desired behavior and we will modify the demo in order to meet your requirements.

Kind regards,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
ToolTip
Asked by
Feizal Amlani
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or