In my Blazor app I use the scheduler in 2 places. Both utilse the same data source. The full view works fine, but if i add in "View.Agenda" I get an error.
Full view - works fine:
<SfSchedule @ref="ScheduleRef" TValue=AppointmentData Width="100%" Height="875px">
<ScheduleEventSettings DataSource="@ calendarToday "></ScheduleEventSettings>
<ScheduleEvents TValue="AppointmentData" ActionCompleted="OnActionCompleted"></ScheduleEvents>
<ScheduleWorkHours Highlight="true" Start="09:00" End="17:00"></ScheduleWorkHours>
</SfSchedule>
Agenda View - Errors:
<SfSchedule @ref="ScheduleRef" TValue="AppointmentData" HideEmptyAgendaDays="true" AgendaDaysCount="7" CssClass="ScheduleAgenda" Width="100%" Height="360px" @bind-SelectedDate="@CurrentDate">
<ScheduleViews>
<ScheduleView Option="View.Agenda"></ScheduleView>
</ScheduleViews>
<ScheduleEventSettings DataSource="@calendarToday"></ScheduleEventSettings>
</SfSchedule>
Error is as follows:
blazor.server.js:21 [2021-10-07T09:13:08.850Z] Error: System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Blazor.Schedule.Internal.AgendaEvent`1.OnParametersSetAsync()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
Thank you for the update