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

RadToolTipManaget from tuturial

3 Answers 55 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Aleksejs
Top achievements
Rank 1
Aleksejs asked on 04 Feb 2011, 02:16 PM
Hey!

Yesterday I started to research Tooltip's features and definatelly this control is awesome.

I have looked all available tutorials http://demos.telerik.com/aspnet-ajax/tooltip/examples/loadondemand/defaultcs.aspx
And got just a quick question :
<telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Position="Center"
    RelativeTo="Element" Width="400px" Height="200px" Animation="Resize" HideEvent="LeaveTargetAndToolTip"
    Skin="Default" OnAjaxUpdate="OnAjaxUpdate" OnClientHide="OnClientHide" EnableShadow="true"
    RenderInPageRoot="true" AnimationDuration="200">
</telerik:RadToolTipManager>
Here is RadTooltipManager, but where are <TargetControl> section. I just do not get where did you specified that tooltip should appear on these webControls. :)

Thank you!

3 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 04 Feb 2011, 02:26 PM
Hello Aleksejs,

 We are glad to hear that you find our RadToolTip control useful!

Straight to your question:

The RadToolTipManager is used to tooltipify multiple elements on the page and thus it has TargetControls collection (in difference compared to the single TargetControlID property of the separate RadToolTip). This collection which holds the target is a server collection which can be populated both in markup (using the <TargetControls> inner property) or dynamically on the server by using the syntax RadToolTipManager1.TargetControls.Add. Since the demo in question has tooltipified repeater, the best manner to add the cells to the collection is to use ItemDataBound event as shown below:

protected void repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            Control image = e.Item.FindControl("smallImage");
            DataRowView currentRow = (DataRowView)e.Item.DataItem;
            //Add the image id to the tooltip manager
            this.RadToolTipManager1.TargetControls.Add(image.ClientID,currentRow.Row["ProductID"].ToString(), true);
        }

The code above is taken from the demo and this is how the repeater cells are actually tooltipified.

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.



Greetings,
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
Aleksejs
Top achievements
Rank 1
answered on 04 Feb 2011, 03:30 PM
Oh God, I love you! =)

So fast and so great answer!

Thank you!
0
Svetlina Anati
Telerik team
answered on 04 Feb 2011, 03:33 PM
Hello Aleksejs,

 Thank you for the good words, I am very happy to hear that I could help!

In case you encounter any other problems or other questions about the RadToolTip control arise, do not hesitate to contact me again!

Kind regards,
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.
Tags
ToolTip
Asked by
Aleksejs
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Aleksejs
Top achievements
Rank 1
Share this question
or