RadToolTip does not work on ASPX page inheriting from Master Page

20 posts, 1 answers
  1. Kathleen Johnson
    Kathleen Johnson avatar
    2 posts
    Member since:
    Apr 2009

    Posted 02 Jun 2010 Link to this post

    Hello,

    I am having a problem with both the RadToolTip or the RadToolTipManager not working on a page that inherits from a master page.  Nothing happens on mouseover or onclick on the element in this scenario (i.e. the RadToolTip fails to appear).  I have created a test project to illustrate and have attached the code.  The problem is independent of where the ScriptManager resides (Master page versus child page).

    When I have a single page, the tooltip shows.  How do I get this to work for the case of a master page?

    Thanks,

    Master Page:
    <%@ Master Language="C#" AutoEventWireup="true" CodeFile="Tool.master.cs" Inherits="Tool" %> 
    <%@ 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"> 
     
    <html xmlns="http://www.w3.org/1999/xhtml">  
    <head runat="server">  
        <title></title>  
        <asp:ContentPlaceHolder id="head" runat="server">  
        </asp:ContentPlaceHolder> 
    </head> 
    <body> 
        <form id="form1" runat="server">  
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> 
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">  
          
        </asp:ContentPlaceHolder> 
        </form> 
    </body> 
    </html> 

    Child Page:
    <%@ Page Title="" Language="C#" MasterPageFile="~/Tool.master" AutoEventWireup="true" CodeFile="ToolTip1.aspx.cs" Inherits="ToolTip1" %> 
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
     
    <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">  
    </asp:Content> 
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">  
        <table> 
            <tr> 
                <td><asp:Image ID="img" runat="server" ImageUrl="~/images/button_i_blue.gif" /></td>  
            </tr> 
        </table> 
        <telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="img"   
            ManualClose="True" IsClientID="True"   
                Height="300px" Width="300px" Text="test123" ShowEvent="OnClick"   
            HideEvent="ManualClose" /> 
    </asp:Content> 
     
     


  2. Tom
    Tom avatar
    41 posts
    Member since:
    Feb 2009

    Posted 07 Jun 2010 Link to this post

    I am having the same problem.  Does anyone know of a resolution?

    Thanks,

    Tom
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 07 Jun 2010 Link to this post

    Hi guys,

    Kathleen, the MasterPage is an INaming Container and as all such containers /e.g UserControl/ it changes the IDs of the controls which are placed inside it. That is why the ClientID and the ID are not the same in this case as it is when using a standard page /more detailed information about INaming Containers is available on the net/. In order to solve the problem you should either "instruct" the tooltip for search for target with the ID as a server control or to provide the correct clientID. Since the first approach requires only to set isClientID="false" /or simply remove it since false is the deafult value/ I recommend to use it.

    Tom, I am not sure that your problem is the same since you did not provide any code. Please, test this solution and if it does not help, provide more detailed on the setup and I will do my best to help.


    All the best,
    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.
  5. Randy
    Randy avatar
    23 posts
    Member since:
    Jul 2012

    Posted 06 Aug 2010 Link to this post

    Hello,

    I have a project.  Attached.  In this project I have one page that does not use master page and I have another that does.  Within each page I have an image in which I want to show details using a ToolTip.  One the page working I have the image as a single image.  On the page not working I have the image repeated (and data bound) to a RadGrid.  The page using master Page is failing when I hover over the image which in turn triggers the tool tip.

    What am I doing wrong?  This is so frustrating, I have spent so many hours trying to figure out what I am doing wrong.  I have search your forums with no avail.  I have attached the screen shot of my error and the project with both pages (1 working and the other not).  You help is much appreciated.  I have cleaned upt he project as much as I can so that you don't have to wade through a lot of code to find the problem or mistake I have made.

    We have purchased RadControls for ASP.NET AJAX Q2 2009 SP1, and I originally thought that was my problem since I am running on .NEt 4.  So I pulled your ASP.NET AJAX Q2 2010 down (since I know you have built that to run on .NEt 4)...but that didn't solve my problem.

    I already created a support ticket.  I jsut wanted to post here so that others can know how it gets solved.
    Thanls,

    - Randy
  6. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 11 Aug 2010 Link to this post

    Hi Randy,

     
    I examined the attachment but this is only a screenshot and not sample code - to be able to attach projects, you should open a support ticket because there is no such an options in teh forums.

    We recently found a bug which is very similar to what you describe and the fix is already available in the latest internal build. Please, download it and test with it, this will most probably resolve the issue.

    If teh issue persists with teh latest internal build, please prepare a simple, fully runnable reproduction demo, open a new support ticket and send it to us and we will debug it locally and do our best to help.

    Best wishes,
    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
  7. Randy
    Randy avatar
    23 posts
    Member since:
    Jul 2012

    Posted 11 Aug 2010 Link to this post

    Thanks, as I already stated:  "I already created a support ticket.  I just wanted to post here so that others can know how it gets solved.".  Unfortunately my support ticket has gone unanswered thus far.
  8. Neal
    Neal avatar
    2 posts
    Member since:
    Aug 2010

    Posted 11 Aug 2010 Link to this post

    Randy,

    We were also spending long hours on this problem with the RadToolTipManager not working correctly on a page inheriting from a MasterPage.  We downloaded the latest internal build that was just posted this day and it has so far fixed this problem. I hope that it solves your issue as well, since I believe it to be the same.

    Regards,

    NealS
  9. Randy
    Randy avatar
    23 posts
    Member since:
    Jul 2012

    Posted 12 Aug 2010 Link to this post

    Forgive me for being so naive...but where can I get the latest internal build that was put up yesterday?  Currently I am using the latest trial version.  When I go to my downloads link for internal builds, it says there aren't any.  If I can download the latest internal build I will test it right away to see if ti solves my problem.
  10. Neal
    Neal avatar
    2 posts
    Member since:
    Aug 2010

    Posted 12 Aug 2010 Link to this post

    That is a good question.  I am not sure how that works.  My fellow developer is the one with access to Telerik's download site.  Fortunately, we just purchased the Q2 2010 version, so I am not sure if this hotfix is available for your version.  Telerik will have to speak for that.
  11. Randy
    Randy avatar
    23 posts
    Member since:
    Jul 2012

    Posted 12 Aug 2010 Link to this post

    Thanks Neal, yeah our purchasing dept has an order in right now for the Telerik controls for Q2 2010, just waiting for them to process it.  In the meantime I was hoping to use the trial version until the order is processed. :(  Oh well, I hope Telerik can cough me an internal build trial fix soon.
  12. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 16 Aug 2010 Link to this post

    Hello guys,

     To be able to see and download the internal builds for a particular version of radControls you should have downloaded this version because our systems shows you the internal builds for teh version it "knows" you have. If you download the licensed version of the latest release, you will get the dev internal builds and respectively - if you download teh trial you will have access to the latest internal builds in their trial version.

    As to the experienced problem itself, it is related to ASP.NET 4.0 and to the ClientIDMode property in particular. I can also suggest you another workaround which overrides the default behavior but I strongly recommend to upgrade to latest build instead because if you override internal source of a control and this later changes on our side, you might face problems with further later upgrades. However, if you prefer the workaround despite this and you prefer to take the risk of overriding internal code, let me know and I will provide it for you.


    Kind 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
  13. Randy
    Randy avatar
    23 posts
    Member since:
    Jul 2012

    Posted 16 Aug 2010 Link to this post

    I have gotta to hand it to you, Svetlina and the Telerik team.  I downloaded the Q2 2010 Hotfix (trial) and it solved the problem.  Thank you so much for looking into this problem and providing a solution.  You have no idea how relieved I am right now.  Thanks again!
  14. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 16 Aug 2010 Link to this post

    Hello Randy,

     Thank you for the good words, we highly appreciate them! We are always trying to do our best to help our customers in their implementations and we are glad to hear that everything works fine on your side now.

    All the best,
    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
  15. Alin
    Alin avatar
    26 posts
    Member since:
    Mar 2011

    Posted 09 Aug 2011 Link to this post

    Hello everybody,

    I am having the problem specified above, with the RadTooltipManager and ClientID modification in masterpage, so I would like to see the version of overriding internal source. I find it strange that people using Q2 2010 Hotfix (trial)  don't have the problem, but me using telerik asp.net ajax Q1 2011 sp2 continue having it :(

    Thanks a lot for your support,

    Alin
  16. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 10 Aug 2011 Link to this post

    Hello Alin,

    I am not certain that the issue you are experiencing is the same as the described in this thread, since this functionality is already incorporated in our code and this override is not a solution we would recommend, especially for using in the long term, as some other issues may arise from it. Nevertheless that code would be overrinding the default ClientIDMode of the RadToolTipManager's update panel:
    protected override void OnInit(EventArgs e) 
        base.OnInit(e); 
        RadToolTipManager1.UpdatePanel.ClientIDMode = System.Web.UI.ClientIDMode.AutoID; 
    }



    Kind regards,
    Marin
    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.

  17. Alin
    Alin avatar
    26 posts
    Member since:
    Mar 2011

    Posted 12 Aug 2011 Link to this post

    Thx.
  18. Niall
    Niall avatar
    2 posts
    Member since:
    Oct 2012

    Posted 05 Oct 2012 Link to this post

    Hello.  I am having the exact same issue except the usercontrol does not appear.  The tooltip does appear but the usercontrol page contents does not, i.e. it is blank.  I have tested the exact same code in a standalone page and it works but if I move to a page using a masterpage, it does not.  See attached screen shot.

    I added the following but it did not make any difference.
                RadToolTipManager1.UpdatePanel.ClientIDMode = System.Web.UI.ClientIDMode.AutoID

    Code below

    Default.aspx


    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
    <telerik:AjaxSetting AjaxControlID="RadGrid1">
    <UpdatedControls>
    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
    <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" />
    </UpdatedControls>
    </telerik:AjaxSetting>
    </AjaxSettings>
    </telerik:RadAjaxManager>

    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>

    <telerik:RadToolTipManager ID="RadToolTipManager1" OffsetY="-1" HideEvent="ManualClose" EnableShadow=true ShowCallout=true
    Width="250" Height="350" runat="server" OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element"
    Position="MiddleRight">
    </telerik:RadToolTipManager>

    <telerik:RadGrid ID="RadGrid1" Width="550" runat="server" DataSourceID="SqlDataSource1"
    GridLines="None" OnItemDataBound="RadGrid1_ItemDataBound" AllowPaging="true"
    AllowSorting="true" PageSize="10" OnItemCommand="RadGrid1_ItemCommand">
    <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="None" CurrentResetPageIndexAction="SetPageIndexToFirst"
    DataKeyNames="COURSE_ID,SESSION_ID" DataSourceID="SqlDataSource1" Dir="LTR" Frame="Border"
    TableLayout="Auto">
    <Columns>
    <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="COURSE_ID" Display="false"
    DataType="System.Int32" FilterListOptions="VaryByDataType" ForceExtractValue="None"
    HeaderText="COURSE_ID" ReadOnly="True" SortExpression="COURSE_ID" UniqueName="COURSE_ID">
    </telerik:GridBoundColumn>
    <telerik:GridTemplateColumn HeaderText="Product" SortExpression="ProductName">
    <ItemTemplate>
    <asp:HyperLink ID="targetControl" runat="server" NavigateUrl="#" Text='<%# Eval("COURSE_ID") %>'></asp:HyperLink>
    </ItemTemplate>
    </telerik:GridTemplateColumn>
    <telerik:GridBoundColumn AllowSorting="true" DataField="CompanyName" HeaderText="Supplier"
    SortExpression="CompanyName" UniqueName="CompanyName">
    </telerik:GridBoundColumn>
    <telerik:GridBoundColumn AllowSorting="true" DataField="UnitPrice" DataFormatString="{0:C}"
    HeaderText="Price" SortExpression="UnitPrice">
    </telerik:GridBoundColumn>
    </Columns>
    <EditFormSettings>
    <EditColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType">
    </EditColumn>
    </EditFormSettings>
    </MasterTableView>
    </telerik:RadGrid>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
    ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM COURSE_AVAILABILITY ">
    </asp:SqlDataSource>


    Default.aspx.vb

    Protected Sub OnAjaxUpdate(sender As Object, args As ToolTipUpdateEventArgs)
    Me.UpdateToolTip(args.Value, args.UpdatePanel)
    End Sub
    Private Sub UpdateToolTip(elementID As String, panel As UpdatePanel)

    Dim ctrl As Control = Page.LoadControl("../AppointmentToolTip.ascx")
    panel.ContentTemplateContainer.Controls.Add(ctrl)
    Dim details As Calendar_AppointmentToolTip = DirectCast(ctrl, Calendar_AppointmentToolTip)
    details.COURSE_ID = elementID

    End Sub
    Protected Sub RadGrid1_ItemDataBound(sender As Object, e As GridItemEventArgs)
    If e.Item.ItemType = GridItemType.Item OrElse e.Item.ItemType = GridItemType.AlternatingItem Then
    Dim target As Control = e.Item.FindControl("targetControl")
    If Not [Object].Equals(target, Nothing) Then
    If Not [Object].Equals(Me.RadToolTipManager1, Nothing) Then
    'Add the button (target) id to the tooltip manager

    Me.RadToolTipManager1.TargetControls.Add(target.ClientID, (TryCast(e.Item, GridDataItem)).GetDataKeyValue("COURSE_ID").ToString(), True)
    End If
    End If
    End If
    End Sub

    Protected Sub RadGrid1_ItemCommand(source As Object, e As GridCommandEventArgs)
    If e.CommandName = "Sort" OrElse e.CommandName = "Page" Then
    RadToolTipManager1.TargetControls.Clear()
    End If

    End Sub

    Protected Sub Page_Init(sender As Object, e As System.EventArgs) Handles Me.Init
    RadToolTipManager1.UpdatePanel.ClientIDMode = System.Web.UI.ClientIDMode.AutoID
    End Sub


  19. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 08 Oct 2012 Link to this post

    Hi Niall,

    The path to your user control is document-relative, so when the control is executedin the code-behind of the master page this path may be different (e.g. the master page is inside some folder in your solution and not in the root like the regular page). You should debug your code and look for server errors (the control does not load, it throws another error, etc.) that will break the response sent to the browser. You should also make sure there aren't any JavaScript errors on the page.


    Kind regards,
    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  20. Niall
    Niall avatar
    2 posts
    Member since:
    Oct 2012

    Posted 08 Oct 2012 Link to this post

    Thanks for the reponse.  I have debugged the code and server side code of the usercontrol does execute as expected when the tooltip loads.  There are no javascripts errors either.

    Any other ideas?
  21. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 10 Oct 2012 Link to this post

    Hi Niall,

    I am not sure what may be causing this behavior. I advise that you open a support ticket and send us a simple, runnable example that will demonstrate the problem, so we can investigate the case. The steps from this blog post can be helpful in creating such sample: http://blogs.telerik.com/supportdept/posts/10-09-29/isolating_a_problem_in_a_sample_project.aspx.


    Greetings,
    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017