BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
When update an appoinment that already exists neither the color, subject or programming was updated this
//Instance variable
also didnt work with any custom object using MVVM pattern.
The Refresh method don't exists for SfSchedule in Xamarin.Forms V.15.3.0.29
XAML
<syncfusion:SfSchedule x:Name="schedule" ScheduleView="MonthView" ShowAppointmentsInline="True" >
<Button Text="Update" Clicked="Button_Update" />// Creating an instance for schedule appointment collection
ObservableCollection<
ScheduleAppointment
> scheduleAppointmentCollection = new ObservableCollection<
In constructor of class
ScheduleAppointment
>();
...
after call InitializeComponent();
//Adding schedule appointment in schedule appointment collection var scheduleAppointment = new ScheduleAppointment() { StartTime = new DateTime(2017, 05, 08, 10, 0, 0), EndTime = new DateTime(2017, 05, 08, 12, 0, 0), Subject = "Occurs every alternate day", IsRecursive = true }; //Adding schedule appointment in schedule appointment collection scheduleAppointmentCollection.Add(scheduleAppointment); //Adding schedule appointment collection to DataSource of SfSchedule schedule.DataSource=scheduleAppointmentCollection; // Creating recurrence rule RecurrenceProperties recurrenceProperties = new RecurrenceProperties(); recurrenceProperties.RecurrenceType = RecurrenceType.Daily; recurrenceProperties.IsRangeRecurrenceCount = true; recurrenceProperties.DailyNDays = 2; recurrenceProperties.IsDailyEveryNDays = true; recurrenceProperties.IsWeeklySunday = false; recurrenceProperties.IsWeeklyMonday = true; recurrenceProperties.IsWeeklyTuesday = false; recurrenceProperties.IsWeeklyWednesday = false; recurrenceProperties.IsWeeklyThursday = false; recurrenceProperties.IsWeeklyFriday = false; recurrenceProperties.IsWeeklySaturday = false; recurrenceProperties.RangeRecurrenceCount = 10; recurrenceProperties.RecurrenceRule = DependencyService.Get<IRecurrenceBuilder>().RRuleGenerator(recurrenceProperties, scheduleAppointment.StartTime, scheduleAppointment.EndTime); // Setting recurrence rule to schedule appointment scheduleAppointment.RecurrenceRule = recurrenceProperties.RecurrenceRule;
....
...
//IN CLICK EVENTprivate void
Button_Update
(object sender, EventArgs e)
{
var scheduleAppointment =
[0];
scheduleAppointmentCollection
RecurrenceProperties recurrenceProperties = new RecurrenceProperties(); recurrenceProperties.RecurrenceType = RecurrenceType.Daily; recurrenceProperties.IsRangeRecurrenceCount = true; recurrenceProperties.DailyNDays = 2; recurrenceProperties.IsDailyEveryNDays = true; recurrenceProperties.IsWeeklySunday = false; recurrenceProperties.IsWeeklyMonday = true; recurrenceProperties.IsWeeklyTuesday = false; recurrenceProperties.IsWeeklyWednesday = false; recurrenceProperties.IsWeeklyThursday = false; recurrenceProperties.IsWeeklyFriday = false; recurrenceProperties.IsWeeklySaturday = false; recurrenceProperties.RangeRecurrenceCount = 40; // HERE IS THE NEW VALUE recurrenceProperties.RecurrenceRule = DependencyService.Get<IRecurrenceBuilder>().RRuleGenerator(recurrenceProperties, scheduleAppointment.StartTime, scheduleAppointment.EndTime); // Setting recurrence rule to schedule appointment scheduleAppointment.RecurrenceRule = recurrenceProperties.RecurrenceRule;
="I Expect the change";
Subject
scheduleAppointment.
}
Hi alfredo,
Thanks for your interest in Syncfusion products.
We have analyzed the given example code and found that you are creating a new ScheduleAppointment object while updating through a button click. We have modified your example code and created a simple sample for the same. Please refer the sample below.
if the given solution does not meet your requirement, could you please provide us more details about your requirement along with XForms cross platform (Android, iOS or UWP), Device configuration etc. It will be helpful for us to analyze on your requirement and provide you the possible solution.
Regards,
Nijamudeen M.