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

How to not show gridview when hovering over an appointment

3 Answers 53 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Martin Hamilton
Top achievements
Rank 1
Iron
Iron
Veteran
Martin Hamilton asked on 13 Jan 2020, 09:36 PM

I'm not sure why this is showing up... How to not show gridview when hovering over an appointment

 

Second question: In the radScheduler1_AppointmentResizeEnd routine - how do I get the value for the new Start and End time after the appointment has been resized?

 

Thank you in advance for your assistance

 

3 Answers, 1 is accepted

Sort by
0
Martin Hamilton
Top achievements
Rank 1
Iron
Iron
Veteran
answered on 14 Jan 2020, 04:07 PM

I just wanted to post this block of code which show's where I'm having the issue determining the New Start and End Times.

 

    Private Sub radScheduler1_AppointmentResizeEnd(sender As Object, e As SchedulerAppointmentEventArgs) Handles radScheduler1.AppointmentResizeEnd
        Dim oSQL As New DAL.SqlServer With {.ConnectionString = _cnQuickboooks}
        Dim CalendarAppointmentID As Integer = 0
        Dim NewStartTime As DateTime = Nothing
        Dim NewEndTime As DateTime = Nothing

        Dim appt As Appointment = e.Appointment
        If Not e.Appointment.DataItem Is Nothing Then

            Dim rowView As DataRowView = TryCast(e.Appointment.DataItem, DataRowView)
            If Not rowView Is Nothing Then
                CalendarAppointmentID = rowView.Row.Item("id")
                Dim duration As TimeSpan = e.Appointment.Duration
                Dim DurationMinutes As Integer = duration.Minutes
                ' I cannot figure out how to get the new start and end times after the user has resized the appointment
                '   NewStartTime = ?????
                '   NewEndTime = ?????
            End If
        Else

        End If
        UpdateData(CalendarAppointmentID, NewStartTime, NewEndTime)
    End Sub

0
Martin Hamilton
Top achievements
Rank 1
Iron
Iron
Veteran
answered on 14 Jan 2020, 04:32 PM

Ok, I figured out what was causing the Grid to appear.

I had copied and pasted an example from the forum - and didn't notice the lines that I rem'd out in the code below.

Taking them out - now causes the grid to "Not Appear" - but, it's good to know anyway.

 

    Private Sub radScheduler1_ScreenTipNeeded(sender As Object, e As ScreenTipNeededEventArgs)
        screenTip.MainTextLabel.Padding = New Padding(2)
        screenTip.CaptionLabel.Padding = New Padding(2)
        screenTip.CaptionLabel.Text = "Caption"
        screenTip.MainTextLabel.Text = ""
        screenTip.EnableCustomSize = True
        'Dim host As New RadHostItem(grid)
        'screenTip.Children.Add(host)
        screenTip.AutoSize = False
        screenTip.Size = New Size(800, 200)

        Dim appointmentElement As AppointmentElement = TryCast(e.Item, AppointmentElement)
        If appointmentElement IsNot Nothing Then
            'bind to appropriate collection of data to display the necessary information
            'grid.DataSource = New List(Of IEvent)() From {appointmentElement.Appointment}
            Dim Summary As String = appointmentElement.Appointment.Summary
            Dim StartTime As String = appointmentElement.Appointment.Start
            Dim EndTime As String = appointmentElement.Appointment.End

            screenTip.CaptionLabel.Text = Summary
            screenTip.MainTextLabel.Text = "From: " & StartTime & " To: " & EndTime
            appointmentElement.ScreenTip = screenTip
            Application.DoEvents()
        End If
    End Sub

However, if the Telerik staff or another developer could help me out with finding the NEW Start and End Times on ResizeEnd - it would be greatly appreciated.

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 16 Jan 2020, 11:23 AM

Hello, Martin,    

Your question about the new start/end time of the appointment in the AppointmentResizeEnd event has been answered in the support ticket that you have opened on the same topic. However, I am posting the answer here as well in order the community to benefit from it.

In the AppointmentResizeEnd event the resize operation has already been completed. Hence, you can get the new start/end time directly from the SchedulerAppointmentEventArgs.Appointment via its Start/End properties.

As to the question about the grid appearing after hovering the scheduler, I am glad you have found out that the ScreenTipNeeded event handler was actually causing it.

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Scheduler and Reminder
Asked by
Martin Hamilton
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Martin Hamilton
Top achievements
Rank 1
Iron
Iron
Veteran
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or