I want to add a check function to the scheduler dialog box OK BUTTON. How do I do that?
1 Answer, 1 is accepted
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 01 Nov 2021, 06:44 AM
Hello, Dominic,
You can create a derivative of EditAppointmentDialog and override its ValidateInput method. It is triggered when the OK button is clicked. Hence, you can perform any additional code in the method.
Hi Dess, how do I exit the dialog box without saving if the condition is not met?
Please check my pic attachment part highlighted in RED. Thanks.
I tried "Exit Sub" but it still creates the appointment.
Dess | Tech Support Engineer, Principal
Telerik team
commented on 03 Nov 2021, 09:56 AM
Dominic, the ApplySettingsToEvent method is called when the OK button is clicked. If you skip the base logic and just return in the if statement, the changes made on the dialog wouldn't be applied to the affected Appointment.