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

Custom form appointment

Hi.

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

Thank you.

3 Replies

MG Mohanraj Gunasekaran Syncfusion Team 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. 



AN Antonio September 19, 2016 06:16 PM UTC

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


MG Mohanraj Gunasekaran Syncfusion Team 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. 


Loader.
Up arrow icon