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.
Unfortunately, activation email could not send to your email. Please try again.

Breaking change MonthInlineLoadedEventArgs apointment casting with ScheduleAppointmentCollection

Thread ID:

Created:

Updated:

Platform:

Replies:

132528 Sep 6,2017 06:34 PM Sep 7,2017 05:50 AM Xamarin.Forms 1
loading
Tags: SfSchedule
Emil
Asked On September 6, 2017 06:34 PM

Below code was suggested by support time and it was working but args.appointments as ScheduleAppointmentCollection casting doesnt work anymore. was it changed?

void Schedule_OnMonthInlineLoadedEvent(object sender, MonthInlineLoadedEventArgs args)
{
var appointment = args.appointments as ScheduleAppointmentCollection;

Subburaj Pandian Veluchamy [Syncfusion]
Replied On September 7, 2017 05:50 AM

Hi Emil, 
 
Sorry for the inconvenience caused. 
 
In Schedule OnMonthInlineLoadedEvent appointments argument of MonthInlineLoadedEventArgs type has been changed as IEnumerable in Xamarin Forms. By considering various scenarios with ScheduleAppointment and CutsomAppointment we have changed the type as IEnumerable from ScheduleAppoinmentCollection. You can get the appointment details from the collection as a type IList instead in the sample. Please refer the below code example, 
 
[c#] 
            var appointments = (args.appointments as IList);
            if (appointments == null || appointments.Count == 0)
            {
                // perform fuction for No events
            }
            else
            {
                // perform fuction for Appointments
                foreach (var item in appointments)
                {
                    var appointmentText = (item as ScheduleAppointment).Subject;
                }
            } 
 
 
 
Could you please check as per the above suggestion and revert us with your requirement if you face any issue. We will check on it and provide you the solution. 
 
Regards,  
Subburaj Pandian V  


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.

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.

;