We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

OnDemand command does not show added events

When I add events in the QueryAppointmentsCommand handler, they do not show up on the scheduler.

I've created a simple demo project which is attached.

Attachment: SchedExample_649cbf17.7z

1 Reply

ET Eswaran Thirugnanasambandam Syncfusion Team February 27, 2023 12:20 PM UTC

Hi Christopher,

After reviewing the shared sample, it appears that the Events property is of type ObservableCollection<SchedulerAppointments>, but it is not being initialized properly. This is likely causing the issue where the Events are not being displayed correctly.

To resolve this issue, you can initialize the ObservableCollection property before adding any values to it as mentioned in the below code snippet.


Events = new ObservableCollection<SchedulerAppointment>();

var ev = new SchedulerAppointment


    StartTime = eventArgs.VisibleDates.First().AddHours(8),

    EndTime = eventArgs.VisibleDates.First().AddHours(9),

    Subject = "Brush Teeth",

    Background = new SolidColorBrush(Color.FromArgb("#FFFC571D"))



We have modified your sample to achieve your requirement and please get it from below attachment.



Attachment: SchedExample_22a25c8e.zip

Live Chat Icon For mobile
Up arrow icon