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

Customize AppointmentEditor


I am looking for a example of customize ApointmentEditor in Windows Form, but I thought only this only (in wpf): https://www.syncfusion.com/forums/109383/can-the-sfschedule-appointmenteditor-be-customized.

I need to create new fields in AppointmentEditor, and enable or disable this fields for each appointment kind.

I saw example in "\Syncfusion\EssentialStudio\13.4.0.53\Windows\Schedule.Windows\Samples\Scheduler Demo\CS", but I don't found any answer.

Can you help me?

1 Reply

AS Amresh S Syncfusion Team March 3, 2016 02:44 PM UTC

Hi Ricardo,

Thanks for using Syncfusion products.

We have analyzed your query and found the solution. This can be achieved by handling the ShowingAppointmentForm event to cancel the default AppointmentForm being loaded.

// Handled to cancel the default AppointmentForm.

void scheduleControl1_ShowingAppointmentForm(object sender, ShowingAppointFormEventArgs e)

{

    e.Item.Subject = "Appointment";

    e.Item.StartTime = DateTime.Now;

    e.Item.LabelValue = 1;

    e.Cancel = true;

    e.Handled = true;

}


Then, the customized form can be loaded by handling the ScheduleAppointmentClick event.


// Used for loading the custom-form.

private void scheduleControl1_ScheduleAppointmentClick(object sender, ScheduleAppointmentClickEventArgs e)

{

    e.Cancel = true;

    CustomForm form = new CustomForm();

    form.Show();

}


Please refer to the below sample and let me know your concerns.


http://www.syncfusion.com/downloads/support/forum/123276/ze/CustomForm622901101



Regards,

Amresh.S


Loader.
Live Chat Icon For mobile
Up arrow icon