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

Custom form appointment

Thread ID:

Created:

Updated:

Platform:

Replies:

126023 Sep 18,2016 07:00 PM UTC Sep 20,2016 04:19 AM UTC WinForms 3
loading
Tags: ScheduleControl
Antonio
Asked On September 18, 2016 07:00 PM UTC

Hi.

How I can use in creating, editing, of appointments, my own form?

Thank you.

Mohanraj Gunasekaran [Syncfusion]
Replied On September 19, 2016 06:10 AM UTC

Hi Antonio, 

Thanks for using Syncfusion products.  
  
The reported scenario with “Creating, editing of appointments by custom form” can be achieved by handling the ShowingAppointmentForm event and custom form can be shown in that event. Here we have provided a sample which shows the custom appointment form which can be used to add the appointment in the Schedule grid. Please refer the below code snippet and refer the attached sample, 
 
Code snippet  
AppointmentForm form;  
void scheduleControl1_ShowingAppointmentForm(object sender, ShowingAppointFormEventArgs e)  
{  
    e.Cancel = true;  
              
    form.ShowDialog();  
}  
  
//Appointments add in button click  
void ok_Click(object sender, System.EventArgs e)  
{  
    IScheduleAppointment item = provider.NewScheduleAppointment();  
    if (item != null)  
    {  
        item.AllDay = true;  
  
        item.StartTime = this.StartDateDateTimePickerAdv.Value;  
  
        item.EndTime = this.EndDateDateTimePickerAdv.Value;  
  
        item.Subject = this.SubjectTextBoxExt.Text;  
           
        //Used to add color for appointments  
        item.LabelValue = this.comboBox1.SelectedIndex;  
                  
        provider.AddItem(item);  
    }  
    this.schedulegrid.DataSource = provider;  
    this.schedulegrid.GetScheduleHost().SetDataToDayPanels();  
    this.Close();  
}  
  
Sample link: ScheduleGrid  
   
Regards,   
Mohanraj G. 


Antonio
Replied On September 19, 2016 06:16 PM UTC

Hi Mohanraj .
Thanks for everything, it has served me as an example.

Mohanraj Gunasekaran [Syncfusion]
Replied On September 20, 2016 04:19 AM UTC

Hi Antonio, 

Thanks for your update. 

We are glad to know that your reported problem has been resolved. Please let us know if you need any further assistance. 

Regards, 
Mohanraj G. 


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

;