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.

How to update the ItemsSource collection using default editor?

You can update the local appointment collection by using the editor events in SfSchedule control. This article explains about how to update the local appointment collection by using default editor.

Updating the local appointment collection using default editor

  1. Create a WPF application and add the SfSchedule control to it.

XAML

  1. Create class for declaring custom appointment properties. For listening the properties dynamically, implement the property contained class in INotifyPropertyChanged interface as in the following code example.

C#

  1. Create local appointment collection. For listening the collection dynamically, use ObservableCollection as in the following code example.

C#

  1. Now create AppointmentEditorClosed event that is based on the “e.Action” value of the event argument, where you can perform your actions by setting “e.Handled” as true to avoid the default action done by the editor. Refer to the following code example.

C#

In the above code example, by using the e.EditedAppointment and e.OriginalAppointment value, you can update the custom appointment collection.

  1. Now create the ScheduleAppointmentMapping as in the following code example.

XAML

After completing the above steps, run the project and the local appointment collection gets updated when you Add and Delete an appointment using Appointment Editor.

SampleLink:

SfSchedule_AppointmentClass

 

Article ID: Published Date: Last Revised Date: Platform: Control:
4501 04/19/2015 05/06/2016 WPF SfSchedule
Tags:
Did you find this information helpful?
Comments
Frederico Regateiro Nov 17, 2015
How can i achieve this behavior by using mvvm pattern?
Reply
Add Comment
You must log in to leave a comment

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.