This is a migrated thread and some comments may be shown as answers.

RadScheduler InsertAppointment not firing when calling from code behind

2 Answers 159 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Ei Wai
Top achievements
Rank 1
Ei Wai asked on 26 Jan 2015, 05:44 AM
Hi ,

I am using Inline template to insert data. There are two command button which is Insert and Update.  To insert appointment, I am trying to call  Insert Appointment method inside RadScheduler1_AppointmentCommand. My code is as below.

Appointment apptForInsert = e.Container.Appointment;
RadScheduler1.InsertAppointment(apptForInsert);
RadScheduler1.Rebind();

By right, it should go to RadScheduler1_AppointmentInsert() method. But it didn't and the inline template form also not closed after all the events fired. Please help me with this issue. 

And there is also another problem I would like to ask. Is there any way to call RadScheduler1_AppointmentCommand from the javascript? I know I can call insertAppointment using javascript. But I am looking for a way to call AppointmentCommand.



Thank you.

Best regards,
Ei Wai

2 Answers, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 28 Jan 2015, 04:35 PM
Hello Ei,

As far as I understand when you click on the insert button it goes in the AppointmentCommand event handler but it does not execute the InsertAppointment method. Is this correct?
Could you please specify whether the appointment is added to the data source?

Our RadScheduler Templates demo implements custom inline form containing buttons with insert and update commands.
As you can see in the AppointmentCommand event handler there is no need to insert the appointment explicitly as soon as there is an insert command associated with the button.  Same thing applies for the update button.

There is no way to call RadScheduler1_AppointmentCommand from the JavaScript.

Regards,
Boyan Dimitrov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Ei Wai
Top achievements
Rank 1
answered on 29 Jan 2015, 01:20 AM
Hello Boyan,

Thank you for your reply. It is solved by adding validation group in the button properties. I am not sure why. 

Best regards,
Ei Wai
Tags
Scheduler
Asked by
Ei Wai
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Ei Wai
Top achievements
Rank 1
Share this question
or