Error when using "View.Agenda" version 19.3.0.44

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()


4 Replies

NR Nevitha Ravi Syncfusion Team October 7, 2021 10:34 AM UTC

Hi Martin, 

Sorry for the inconvenience caused. 

The reported issue is a known breaking issue which will be resolved in our upcoming patch release scheduled on October 12, 2021. Please track the status through the following link. 

We suggest to define Id field in TValue model class to overcome the problem as below until then. 

public class AppointmentData {  
        public int Id { get; set; }  
        public string Subject { get; set; }  
        public string Location { get; set; }  
        public DateTime StartTime { get; set; }  
        public DateTime EndTime { get; set; }  
        public string Description { get; set; }  
        public bool IsAllDay { get; set; }  
        public string RecurrenceRule { get; set; }  
        public string RecurrenceException { get; set; }  
        public Nullable<int> RecurrenceID { get; set; }  
} 
Please let us know if you need any further assistance. 

Regards, 
Nevitha  



MA Martin October 7, 2021 11:14 AM UTC

Thank you for the update



NR Nevitha Ravi Syncfusion Team October 8, 2021 03:56 AM UTC

Hi Martin, 

You are most welcome..! We will let you know once the issue has been resolved. Please be patience until then.. 

Regards, 
Nevitha. 



NR Nevitha Ravi Syncfusion Team October 13, 2021 09:45 AM UTC

Hi Martin, 
 
Thanks for being patience, 

We are glad to announce that our weekly patch release v19.3.0.45 is rolled out successfully. In this release, the exception throws in Agenda view when TValue has no Id field has been resolved. 
 
Please upgrade your package and let us know if you would require any further assistance. 
 
Regards, 
Nevitha 


Loader.
Up arrow icon