Content

The Tooltip provides options for defining its content and for loading its content on demand.

Defining the Content

To define the content for the Tooltip, use any of the following approaches:

  • Static text—Set a static text to be displayed as text.
  • Function—A JavaScript function to supply the content for the Tooltip.
  • Ajax—The content is to be retrieved through an Ajax request.

Loading on Demand

  1. Make sure you followed all the steps from the introductory article on Telerik UI for ASP.NET MVC.
  2. Create a new action method which renders the view.

    public ActionResult Index()
    {
        return View();
    }
    
  3. Create an action method which renders the content.

    public ActionResult AjaxContent()
    {
        return View();
    }
    
  4. Add a Tooltip.

        <%: Html.Kendo().Tooltip()
            .For("#container") // The for option of the Tooltip is mandatory.
                            // It is a jQuery selector which specifies the element or the container for the elements for which the Tooltip will be shown.
            .LoadContentFrom("AjaxContent", "Tooltip") // Define the Action and Controller names.
        %>
    
        @(Html.Kendo().Tooltip()
            .For("#container") // The for option of the Tooltip is mandatory.
                            // It is a jQuery selector which specifies the element or the container for the elements for which the Tooltip will be shown.
            .LoadContentFrom("AjaxContent", "Tooltip") // Define the Action and Controller names.
        )
    

See Also

In this article
Not finding the help you need? Improve this article