Hide Display of Multi-Day Appointment on Weekends

2 posts, 0 answers
  1. Matthew
    Matthew avatar
    1 posts
    Member since:
    Mar 2016

    Posted 23 May Link to this post

    Hello, I've been asked to use RadScheduler (not RadGantt), more specifically its MonthView, to display task data that usually spans several days.

    The MonthView requires FirstDayOfWeek = Sunday and LastDayOfWeek = Saturday. i.e. show weekends.

    If I have an Appointment instance that runs from Wednesday to the following Tuesday, I want to see it displayed on Wednesday, Thursday, Friday, then Monday, Tuesday of the following week.

    I've tried to use the RadScheduler1_TimeSlotCreated event handler to get e.TimeSlot.Appointments list and hide all Appointment instances but this approach isn't working:

    Dim scheduler As RadScheduler = DirectCast(sender, RadScheduler)
    If scheduler.SelectedView = SchedulerViewType.MonthView Then
        If e.TimeSlot.Start.DayOfWeek = DayOfWeek.Saturday OrElse e.TimeSlot.Start.DayOfWeek = DayOfWeek.Sunday Then
            For Each appt In e.TimeSlot.Appointments  
                appt.Visible = False
           Next
        End If
    End If

    Is this doable? Or will I have to break the multi-day task into daily recurring Appointment objects? I hope not since the task Subject can be lengthy and having only one Subject for several days fits nicely in MonthView. Thanks. Jo

  2. Bozhidar
    Admin
    Bozhidar avatar
    1102 posts

    Posted 26 May Link to this post

    Hi,

    This kind of display is not supported by the Scheduler control. You can either use the approach you mentioned with a recurring appointment, or split the appointment into several one-week appointments, which are in the Monday-Friday range.

    Regards,
    Bozhidar
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top