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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to load events in calendar from a list?

Thread ID:

Created:

Updated:

Platform:

Replies:

145405 Jun 20,2019 07:13 AM UTC Jun 21,2019 01:31 PM UTC Xamarin.Forms 1
loading
Tags: SfCalendar
Raphael
Asked On June 20, 2019 07:13 AM UTC

Hi,

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;
               
                CalendarInlineEvents.Add(events);


            }


        }

Indumathi Ravichandran [Syncfusion]
Replied On 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. 
Regards, 
Indumathi R 



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon