RadToolTipManaget from tuturial

4 posts, 0 answers
  1. Aleksejs
    Aleksejs avatar
    10 posts
    Member since:
    Aug 2010

    Posted 04 Feb 2011 Link to this post

    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!
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 04 Feb 2011 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Aleksejs
    Aleksejs avatar
    10 posts
    Member since:
    Aug 2010

    Posted 04 Feb 2011 Link to this post

    Oh God, I love you! =)

    So fast and so great answer!

    Thank you!
  5. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 04 Feb 2011 Link to this post

    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.
Back to Top