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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfSchedule Don't refresh after update an appoinment that already exists V.15.3.0.29

Thread ID:

Created:

Updated:

Platform:

Replies:

132422 Aug 31,2017 02:37 PM UTC Sep 1,2017 09:11 AM UTC Xamarin.Forms 1
loading
Tags: SfSchedule
alfredo zuloaga
Asked On August 31, 2017 02:37 PM UTC

When update an appoinment that already exists neither the color, subject or programming was updated this 
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" />


//Instance variable
// Creating an instance for schedule appointment collection
ObservableCollection<ScheduleAppointment> scheduleAppointmentCollection = new ObservableCollection<ScheduleAppointment>();


...
In constructor of class
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 EVENT

private void Button_Update(object sender, EventArgs e)
{

var scheduleAppointment =scheduleAppointmentCollection[0];


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;

        scheduleAppointment.Subject="I Expect the change";
}

Nijamudeen Mohamed Sulaiman [Syncfusion]
Replied On September 1, 2017 09:11 AM UTC

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.


Attachment: SfSchedule_Appointment_XForms_d61d5688.zip

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.

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

;