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

Hide Display of Multi-Day Appointment on Weekends

1 Answer 112 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Evan
Top achievements
Rank 1
Evan asked on 23 May 2016, 06:50 PM

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

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 26 May 2016, 07:44 AM
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.
Tags
Scheduler
Asked by
Evan
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or