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

BUG: AutoTooltipify property ignored if no targetcontrols set

3 Answers 73 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Charles
Top achievements
Rank 1
Charles asked on 11 Sep 2008, 12:18 PM
Hi,

I am trying to use a RadTooltipManager for a scheduler application. I add to the targetcontrols collection programmatically in the appointmentcreated event handler, however when the page runs any default tooltips on the page (i.e. my RadCalendar control) shows the RadTooltip even though the AutoTooltipify property is set.

Example code:

UI:

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<asp:Content ID="Content1" ContentPlaceHolderID="cntrlMainPlaceHolder" Runat="Server">  
        <asp:UpdatePanel ID="cntrlTest" UpdateMode="Conditional">  
            <ContentTemplate> 
                <telerik:RadCalendar ID="cntrlDiaryCalendar" AutoPostBack="true" EnableMultiSelect="false" Width="100%" runat="server" /> 
            </ContentTemplate> 
        </asp:UpdatePanel> 
 
        <asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional">  
            <ContentTemplate> 
                <telerik:RadScheduler runat="server" ID="RadScheduler1" Width="750px" Skin="WebBlue" 
                    EnableEmbeddedSkins="True" TimeZoneOffset="03:00:00" SelectedDate="2008-09-11" 
                    DayStartTime="08:00:00" DayEndTime="18:00:00" 
                    DataKeyField="ID" DataSubjectField="Subject" DataStartField="Start" DataEndField="End" 
                    DisplayDeleteConfirmation="false">  
                <TimelineView UserSelectable="false" />   
                <AppointmentTemplate> 
                    XX  
                </AppointmentTemplate>                     
                </telerik:RadScheduler> 
                <telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Width="300" Height="150" 
                    Skin="WebBlue" Animation="None" Position="BottomRight" Sticky="true" Text="Loading..." AutoTooltipify="false" 
                 > 
                    <TargetControls> 
                        <telerik:ToolTipTargetControl TargetControlID="xx" IsClientID="true" /> 
                    </TargetControls> 
                 </telerik:RadToolTipManager> 
                   <asp:Timer ID="tmrTest" Interval="1" Enabled="true" runat="server" /> 
            </ContentTemplate> 
        </asp:UpdatePanel> 
 
 
</asp:Content> 

Code:

Partial Class Test  
    Inherits System.Web.UI.Page  
 
    Protected Sub RadToolTipManager1_AjaxUpdate(ByVal sender As ObjectByVal e As Telerik.Web.UI.ToolTipUpdateEventArgs) Handles RadToolTipManager1.AjaxUpdate  
 
    End Sub 
 
    Protected Sub RadScheduler1_AppointmentCreated(ByVal sender As ObjectByVal e As Telerik.Web.UI.AppointmentCreatedEventArgs) Handles RadScheduler1.AppointmentCreated  
        RadToolTipManager1.TargetControls.Add(e.Appointment.ClientID, True)  
    End Sub 
 
    Protected Sub tmrTest_Tick(ByVal sender As ObjectByVal e As System.EventArgs) Handles tmrTest.Tick  
        tmrTest.Enabled = False 
        getdata()  
    End Sub 
 
    Private Sub getdata()  
        Dim oItems As New List(Of Appointment)  
        oItems.Add(New Appointment(1, "testing"Date.Now))  
        RadScheduler1.DataSource = oItems  
        RadScheduler1.DataBind()  
    End Sub 
End Class 
 
Public Class Appointment  
    Private _id As Integer = 0  
    Private _Subject As String = String.Empty  
    Private _Start As DateTime = Date.Now  
 
    Public ReadOnly Property Id() As Integer 
        Get 
            Return _id  
        End Get 
    End Property 
 
    Public ReadOnly Property Subject() As String 
        Get 
            Return _Subject  
        End Get 
    End Property 
 
    Public ReadOnly Property Start() As DateTime  
        Get 
            Return _Start  
        End Get 
    End Property 
 
    Public ReadOnly Property [End]() As DateTime  
        Get 
            Return Start.AddHours(1)  
        End Get 
    End Property 
 
    Public Sub New(ByVal Id As IntegerByVal Subject As StringByVal Start As DateTime)  
        _id = Id  
        _Subject = Subject  
        _Start = Start  
    End Sub 
 
End Class 

Regards

3 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 16 Sep 2008, 07:41 AM
Hello Charles,

I prepared a sample demo project based on the provided code in order to reproduce the problem but unfortunately to no avail. The browser tooltips are shown for the calendar instead of RadToolTips and as far as I understood this is your requirement.

Would you please examine the attached project and screenshot and tell me whether I am doing something wrong?

In case your problem persists, please modify the attached demo in order to reproduce the problem, open a new support ticket and send it back to me along with a detailed explanation of the reproduction steps and the desired behavior. Once I receive it I will do my best to modify it according to your needs.

All the best,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Conan Galloway
Top achievements
Rank 1
answered on 25 Nov 2008, 06:35 PM
Hello

I am having the same problem.  An item that I noticied that might be affecting why you are not recreating the problem is that if autotooltipify is set to false on the control the problem will not occur on initial load and other controls use the browser tooltip.  When my page either posts back or call backs I get the problem.  In my example it is when I filter my RadGrid containing the RadToolTips.

A quick but unelegant solution is to add a control (I used a 1px image) and set it's visible property to false.  I then added that single control to the RadToolTip manager and the manager does not seem to be autotooltipifying the other controls.

Hope this helps.

Conan Galloway
0
Svetlina Anati
Telerik team
answered on 27 Nov 2008, 02:28 PM
Hi guys,

We are currently working on resolving this issue which occurs only in specific configuration and only when the RadToolTipManager is updated by using AJAX - in a postback scenario the problem does not occur. However, the solution is more simple than the one described by Conan - it is not necessary to add an additional control to the page at all - you can set an imaginary string as a TargetControlID and you should also set the isClientID property to true in order to avoid an error that the control does not exist.

Regards,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ToolTip
Asked by
Charles
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Conan Galloway
Top achievements
Rank 1
Share this question
or