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
close icon

Breaking change MonthInlineLoadedEventArgs apointment casting with ScheduleAppointmentCollection

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;

3 Replies

SP Subburaj Pandian Veluchamy Syncfusion Team September 7, 2017 09:50 AM UTC

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  



AD Andy Dent May 15, 2019 10:33 AM UTC

Please update the documentation for this callback and for the MonthCellLoadedEventArgs to warn people of this change and that previous samples are no longer valid. I wasted a couple of hours diagnosing a code failure and was in the process of writing a bug report for you when I found this forum comment. 

There's a lot of sample code floating around provided by you in previous support messages which now crashes.


SP Subburaj Pandian Veluchamy Syncfusion Team May 16, 2019 08:54 AM UTC

Hi Andy, 
 
We regret for the inconvenience caused.

 
Regarding this Schedule DataSource type changes, we already made necessary changes in our User Guide documentation. Unfortunately, we can’t update / modify previously provided support updates.

We have checked our current UG and the details mentioned are updated codes only. Can you please check the same and let us know if you found any other document with the older content? We will check on it and update the same as early as possible.

UG link: https://help.syncfusion.com/xamarin/sfschedule/monthview#using-style 
 
Regards,
Subburaj Pandian V   


Loader.
Live Chat Icon For mobile
Up arrow icon