TooltipManager and RadComboBox MasterPage

7 posts, 0 answers
  1. Fred Wesson
    Fred Wesson avatar
    15 posts
    Member since:
    May 2010

    Posted 28 May 2010 Link to this post

    I have a RadToolTipManager on a master page and a RadComboBox on a child page.  I am trying to show a tooltip for the combobox on the onFocus event.  First off, the tooltip won't show using the ToolTipManager's showevent=onFocus property.  If I set the OnClientFocus property of the RadComboBox to show the ToolTip via javascript, I get a javascript runtime error (Object doesn't support this property or method).

    If I put the RadToolTipManager on the child page, everything works fine, but I need it to be in the masterpage.  Any thoughts?

    Thanks...
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 02 Jun 2010 Link to this post

    Hello Fred Wesson,

    I am not completely sure about your exact scenario and setup but basically  the RadComboBox as all RadControls is complex HTML and it is formed by different standard HTML elements. The combo has its focus event when actually the input is focused and thus you should specify the input for the RadToolTip to provide the direct needed to be focused element.

    This being said I can suggest to use one of the following solutions:

    1) Set the input as shown below:

    Copy Code
    <telerik:RadComboBox ID="RadComboBoxCurrency" runat="server" Skin="Outlook" Width="184px">
    </telerik:RadComboBox>
    <telerik:RadToolTip ID="RadToolTipCurrency" runat="server" TargetControlID="RadComboBoxCurrency_Input"
        IsClientID="true" Position="MiddleRight" RelativeTo="Element" ShowDelay="100"
        ShowEvent="OnFocus" Text="****" Skin="Windows7" AnimationDuration="300" Animation="Resize"
        HideDelay="200" />

    Note, that the tooltip will search for a server control with such an ID and thus you should explicitly set isClientID to true.

    2) You can handle the OnClientFocus event of the RadComboBox (which internally "knows" that this is actually fired by the input) and use the RadToolTipManager's client API to show the tooltip as explained below:

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

    However, since you are using a MasterPage and the MasterPage is an INaming Conatiner you should take care to provide the correct ClientIDs because they will not be the same as the IDs and you can do it as you do in standard ASP when dealing with a MasterPage - e.g hard code it, use code block to evaluate at runtime, etc.

    I hope that my reply is detailed enough and helpful, let me know how it goes.


    Regards,
    Svetlina
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Fred Wesson
    Fred Wesson avatar
    15 posts
    Member since:
    May 2010

    Posted 02 Jun 2010 Link to this post

    Thank you for your reply Svetlina.
    I am using the RadToolTipManager to dynamically show messages for any control on the child page (ie. error messages) via the code behind.  In the server side code behind, if the condition exists (ie field required), I set the tooltipmanager to show the error message via a tooltip when the control has the focus.  Since the tooltips need to be dynamic for any control that could be placed on the child page, using the RadToolTip is not practical as each control would have to have one.

    I have tried using the client API to show the tooltip (for the radtooltipmanager as well as a radtooltip) as you suggested, but I still get a javascript error (Object doesn't support this property or method).  It appears to me that the radtooltipmanager/radtooltip does not work with a radcombobox if the radtooltipmanager/radtooltip is in a masterpage and the radcombobox is in a child page.
  5. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 08 Jun 2010 Link to this post

    Hi Fred,

    I already answered your support thread and from your feedback I understood that the problem is now fixed. In case you need further assistance or you have encountered another issue, please provide more detailed explanations and I will do my best to help.

    Regards,
    Svetlina
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. Milind Raje
    Milind Raje avatar
    37 posts
    Member since:
    May 2010

    Posted 10 Nov 2010 Link to this post

    I have a radtooltipmanager on my page:
    <%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="FraGo.Test" %>
     
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
     <telerik:RadToolTipManager ID="radToolTipManager"  HideEvent="LeaveToolTip" Position="BottomCenter"
                Width="200px" Height="200px" runat="server" OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element" Skin="Telerik"
                Sticky="true" BorderWidth="20px" BorderStyle="Outset" EnableShadow="true">
            </telerik:RadToolTipManager>
             
        <asp:LinkButton ID="myAccountLinkButton" runat="server" Text="My Account" ></asp:LinkButton>
    </asp:Content>

    The code behind is very simple:
    public partial class Test : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                if (!this.IsPostBack)
                {
                    this.radToolTipManager.TargetControls.Add(this.myAccountLinkButton.ClientID, "2", true);
                }
            }
     
            protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)
            {
                this.UpdateToolTip(args.Value, args.UpdatePanel);
            }
     
            private void UpdateToolTip(string elementID, UpdatePanel panel)
            {
                CouponDetailsControl ctrl = (CouponDetailsControl)Page.LoadControl("~/search/CouponDetailsControl.ascx");
                // Element ID is couponID
                panel.ContentTemplateContainer.Controls.Add(ctrl);
            } // end method

    My master page is:
    <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="FraGo.Site1" %>
     
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    <head runat="server">
        <title></title>
        <asp:ContentPlaceHolder ID="HeadContent" runat="server">
        </asp:ContentPlaceHolder>
    </head>
    <body>
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
        <telerik:RadAjaxManager ID="mainRadAjaxManager" runat="server" EnableAJAX="true"  />
        <div>
            <asp:ContentPlaceHolder ID="MainContent" runat="server">
             
            </asp:ContentPlaceHolder>
        </div>
        </form>
         
    </body>
    </html>

    When I put the mouse over the LinkButton the tooltip shows as a box (with no content) however it gives a runtime jscript error.
    Have no idea why this is happening. It works fine if I don't use the master page.
    thanks
    milind
  7. Milind Raje
    Milind Raje avatar
    37 posts
    Member since:
    May 2010

    Posted 12 Nov 2010 Link to this post

    I think the problem is with Telerik version I am using. I am using Version=2010.2.713.40. I ran the same code on a computer which has Version=2010.1.415.40 and it works fine.
  8. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 16 Nov 2010 Link to this post

    Hello Milind Raje,

     This problem was actually related to the new ClientIDMode property in .NET 4.0 and it was resolved in Q2 2010 SP1 (version number 2010.2.826) as noted in the release notes below:

    http://www.telerik.com/products/aspnet-ajax/whats-new/release-history/q2-2010-sp1-version-number-2010-2-826.aspx

    I am not sure why it worked on your other machine but to resolve the issue you should upgrade to the mentioned version of RadControls or later.

    Kind regards,
    Svetlina
    the Telerik team
    Browse the vast support resources we have to jumpstart 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
UI for ASP.NET Ajax is Ready for VS 2017