Schedule control not working

Hello,
I am currently trying to customize the MonthCell Appearance of the SfScheduler Control on Xamarin Forms (Android)
I am using a ViewModel (ReactiveUI) that contains a List of Appointments (using a custom model and setting the AppointmentMapping in the xaml file)
 
Without customizing the Month view, it renders all of my appointments.
However, I need to customize it.
Thus, I tried all of the possible ways from the documentation:
 
The Event: OnMonthCellLoadedEvent
This sounded very promising - I subscribed to it and debugged a lot, but unfortunately I found out, that I don't get any appointment information in the arguments. (This is likely caused, because the event fires on initial cell creating and my Appointments are loaded and provided dynamically)
 
DataTemplate:
I tried using a Datatemplate for the MonthCellTemplate. I managed to get a Label rendered, with Text bound to a Date-Property which displays correctly, but unfortunately I could not render the appointments. I tried rendering a ListView with ItemSource {Binding Appointments} but it did not render any appointments (although I can definately say, that the Model - i.e. the datasource - contains appointments for this day)
 
DataTemplateSelector:
Same result as with the usual datatemplate - there were no appointments inside of the OnSelectTemplate Method
 
So, is there any way to customize the appearance of the Appointments inside of the MonthCell if a Datasource is used that updates dynamically?
 
kind regards

1 Reply

GC Ganeshamoorthy Chandramoorthy Syncfusion Team September 11, 2018 12:44 PM UTC

Hi Daniel, 
 
 
As per the implementation in Schedule, we have used three views for Android and two views for UWP and iOS to initially load with data. While swiping, we have reused the views and only the data will be changed, we have handled it internally. But in the OnVisibleDatesChanged event, actual date range will be displayed as expected. 
 
So, for Xamarin Forms Android, you will need to add appointments for three months (current, next & previous) in DataSource on initial load and OnVisibleDatesChanged event at run time, kindly refer the sample below. 
 
 
Please let us know if you need any further assistance on this. 
  
 
Regards, 
Ganeshamoorthy C 


Loader.
Up arrow icon