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

Cannot get RadToolTipManager to work with RadTreeView Node

2 Answers 31 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 31 Dec 2010, 06:06 PM

For some crazy (but i'm sure very simple) reason i cannot get this to work, any help would be appreciated.

<body>

    <form id="form1" runat="server">

    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">

    </telerik:RadScriptManager>

    <div>

        <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server">

        </telerik:RadToolTipManager>

        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">

        </telerik:RadAjaxLoadingPanel>

        <telerik:RadTreeView ID="TazaTree" runat="server">

        </telerik:RadTreeView>

        <br />

        <asp:Button ID="Button1" runat="server" Text="Button" />

    </div>

    <telerik:RadAjaxManager runat="server">

        <AjaxSettings>

            <telerik:AjaxSetting AjaxControlID="Button1">

                <UpdatedControls>

                    <telerik:AjaxUpdatedControl ControlID="TazaTree" />

                </UpdatedControls>

            </telerik:AjaxSetting>

        </AjaxSettings>

    </telerik:RadAjaxManager>

    </form>

</body>

 

 

 

 

 

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

 

        Dim ReMan As New ReMan

        Dim REs As List(Of ReUltraObj) = ReMan.GetCompanyUltraREsByCity("1000", "San Jose")

 

        For Each RE As ReUltraObj In REs

            Dim RENode As New RadTreeNode

            RENode.Value = RE.REID.ToString

            RENode.Text = RE.Address

            TazaTree.Nodes.Add(RENode)

 

            RadToolTipManager1.TargetControls.Add(RENode.ClientID, RENode.Value, True)

        Next

 

    End Sub

 

    Protected Sub RadToolTipManager1_AjaxUpdate(ByVal sender As Object, ByVal e As Telerik.Web.UI.ToolTipUpdateEventArgs) Handles RadToolTipManager1.AjaxUpdate

        Dim L As New Label

        L.Text = "test"

        e.UpdatePanel.ContentTemplateContainer.Controls.Add(L)

    End Sub

2 Answers, 1 is accepted

Sort by
0
Accepted
Svetlina Anati
Telerik team
answered on 03 Jan 2011, 12:34 PM
Hi Sam,

  Indeed, the RadTreeNodes do not have client IDs. However, you can either assign such on the server or create the tooltip dynamically on the client. For such cases we have prepared the following demo which shows both the approaches:

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

If you want to tooltipify only particular nodes, you should add the only their ClientIDs (which you programmatically set) to the TargetControls collection or create dynamically tooltips only when they are hovered - in this manner the other nodes will not get tooltipified.

Note, also, that when you update the tree, you should make sure that you also update the tooltip manager with AJAX .

Please, examine the code and use it as a start point for your implementation.

On a side note, when you install RadControls, our online examples projects are automatically installed on your computer and you can not only examine their full source code, but also extend them further in order to meet your requirements.

You can open the demos from here:

Start\Programs\Telerik\RadControls for ASPNET AJAX\Open Sample WebSite In VisualStudio

The actual location on your hard disk is the following one:

C:\Program Files\Telerik\RadControls for ASPNET AJAX \Live Demos

I hope that this information is helpful, let me know if you have additional questions or you need further assistance.

Best wishes,
Svetlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Sam
Top achievements
Rank 1
answered on 03 Jan 2011, 05:42 PM
Thank you, that will do it.

-Sam
Tags
ToolTip
Asked by
Sam
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Sam
Top achievements
Rank 1
Share this question
or