Hi Svetlina
It's a fairly large project so I can't easily send you the project. I'll try to show all the relevant code below and hopefully we can sort it out.
In the
AppointmentCreated event I run this code to add the tooltips to the collection.
If (e.Appointment.Visible AndAlso Not IsAppointmentRegisteredForTooltip(e.Appointment)) Then
Dim tttc As New ToolTipTargetControl
Dim linkButton As LinkButton = DirectCast(e.Container.FindControl("LinkButtonMoreInfo"), LinkButton)
tttc.Value = CInt(e.Appointment.ClientID.Split("_")(1))
tttc.IsClientID = True
tttc.TargetControlID = linkButton.ClientID
RadToolTipManager1.TargetControls.Add(tttc)
End If
I also have these two events being handled
Protected
Sub RadToolTipManager1_AjaxUpdate(ByVal sender As Object, ByVal e As ToolTipUpdateEventArgs)
Try
If (Scheduler.Appointments.Count > 0) Then
Dim apt As Appointment = Scheduler.Appointments(e.Value)
Dim toolTip As AppointmentToolTip = CType(LoadControl("AppointmentToolTip.ascx"), AppointmentToolTip)
toolTip.TargetAppointment = apt
e.UpdatePanel.ContentTemplateContainer.Controls.Add(toolTip)
End If
Catch ex As Exception
Throw New Exception(String.Format("Problem with RadToolTipManager1_AjaxUpdate: {0} e.value={1}", ex.Message, e.Value), ex)
End Try
End Sub
Private Sub Scheduler_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles Scheduler.DataBound
Try
RadToolTipManager1.TargetControls.Clear()
Catch ex As Exception
Throw New Exception("Problem with Scheduler_DataBound", ex)
End Try
End Sub
In the html of the appointmenttemplate for the scheduler I have this
<
asp:LinkButton ID="LinkButtonMoreInfo" OnClientClick="onButtonClick(this, event);" runat="server" Text="more">
</asp:LinkButton>
Which runs this bit of javascript
function
onButtonClick(sender,e){
//Prevent click bubbling up to scheduler
$telerik.cancelRawEvent(e);
}
And here is the tooltipmanager
<
telerik:RadToolTipManager ManualClose="true" runat="server" ID="RadToolTipManager1"
Width="300" Height="250" RelativeTo="Element" Animation="Resize"
Position="Center"
Sticky="true" Text="Loading..." OnAjaxUpdate="RadToolTipManager1_AjaxUpdate"
ShowEvent="OnClick" />
I hope that all makes sense :)
Thanks
Jon