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

How to load events in calendar from a list?


I have manage to get the list of events. but when i load it and add it to CalendarInlineEvents it will only show the last row of the list. may i know what is the issue?

  public async Task FillCalendarEvents(int DoctorId)

            int doctorId = Convert.ToInt32(Application.Current.Properties["DoctorId"]);
            calendarModels = new ObservableCollection<CalendarModel>();
            calendarModels = await Api.GetAllEventsbyDoctorId(doctorId);
            CalendarInlineEvent events = new CalendarInlineEvent();
            List<CalendarModel> appointmentList = new List<CalendarModel>();
            foreach (var item in calendarModels)
                CalendarModel appointment = new CalendarModel();

                events.StartTime = item.EventStartDate;
                events.EndTime = item.EventEndDate;
                events.Subject = item.EventName;
                events.Color = Color.Red;



1 Reply

IR Indumathi Ravichandran Syncfusion Team June 21, 2019 01:31 PM UTC

Hi Raphael, 
Thank you for contacting Syncfusion support. 
We have checked and the provided information is not sufficient to analyze your requirement. Also based on the provided information we have prepared the simple sample.  
If the shared sample does not meet your requirement, please modify the sample based on your scenario and revert us with more details. It will be helpful for us to check on it and provide you solution at the earliest. 
Indumathi R 

Live Chat Icon For mobile
Up arrow icon