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

RadTreeView, RadTreeNode & RadTooltipManager

1 Answer 140 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
pky
Top achievements
Rank 1
pky asked on 13 Jul 2008, 05:19 AM
Hello

I have radtooltipmanager & radtreeview defined in aspx page like

 <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" Position="BottomCenter"
        Animation="Fade" OnAjaxUpdate="OnAjaxUpdate"
        Skin="Web20"
        Width="380px"
         ShowEvent="OnMouseOver"
          ShowDelay="2000"
           HideDelay="2000"
         AutoTooltipify="false"
        Height="250px" Style="font-size: 18px; text-align: center; font-family: Arial;">

<telerik:RadTreeView ID="SourceView" runat="server"
                      Skin="Vista"
                      EnableDragAndDrop="True" 
                      OnNodeClick="sourceClick"
                      OnClientNodeDropping="DropHandler"
                      OnNodeDrop="handleDrop"
                     LoadingMessage="Loading..." LoadingStatusPosition="BeforeNodeText"  >
        <CollapseAnimation Duration="100" Type="OutQuint" />
        <ExpandAnimation Duration="100" Type="OutQuart" />
    </telerik:RadTreeView>


In the code behind I add nodes to RadToolTip manager like:

 protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
        addTooltips();
    }
   
   
   
    protected void addTooltips()
    {
        RadToolTipManager1.TargetControls.Clear();
        RadToolTipManager1.TargetControls.Add(SourceView.ClientID, "0", true);
        foreach (RadTreeNode node in SourceView.GetAllNodes())
        {
            RadToolTipManager1.TargetControls.Add(node.ClientID, node.Text, true);
        }
    }


and on OnAjaxUpdate:

 protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)
    {
        this.UpdateToolTip(args.Value, args.UpdatePanel);
    }

    private void UpdateToolTip(string elementID, UpdatePanel panel)
    {
        Control ctrl = Page.LoadControl("ContainerTooltip.ascx");

 .....
}
     

Now however all the time UpdatToolTip get's called with the elementID = "0";
and never with the elementId of added nodes.

How to get the thing work in a way, that I could see which node the tooltip is over ?

Any help would be appreciated, because I have tried to get this to work from time to time over half year :-)

Regards,
 Markku

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 15 Jul 2008, 10:53 AM
Hi pky,

I prepared a sample project which demonstrates the desired functionality. Please, note that you should add an ID attribute to the RadTreeView nodes because they do not have an ID on the client.

Greetings,
Svetlina
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ToolTip
Asked by
pky
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or