Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
570
ultraDayView without overlaping
posted

I made a short example of what i need, see on FILE ATTACHMENT for my source code.

I want to add a new appointment in my day and move down all existing appointments. 

If you dont understand what i say check the image and source code in my zip file.

It's a basic example, in the futur i will trap the drag and drop and resize appointment and if i encounter a overlap appointment i want to move down all existing appointments.

Sorry for my english....

DayView.rar
Parents
No Data
Reply
  • 53790
    Suggested Answer
    posted

    Hi,

    Maybe one possible approach to solve your task, could be if you handle BeforeAppointmentAdded event. There you could check if the new appointment is in a conflict with another appointment and if so, you could use a loop through appointments to add Offset. For example:

    Private Sub ultraCalendarInfo1_BeforeAppointmentAdded(sender As Object, e As CancelableAppointmentEventArgs)  

     For Each app As Appointment In ultraCalendarInfo1.Appointments  

        app.OffsetStartTime(New TimeSpan(1, 0, 0))  // Offset 1 hour

      Next

    End Sub

    Let me know if you have any questions.

Children