Good day.
I want to delete the Appointment inside the AdvancedEditForm of RadScheduler. So I added a Button in the form with the following attributes.
<asp:Button ID="btnDeleteShift" runat="server" Text="Delete " Enabled="true" CommandName ="Delete" OnClientClick="return confirm('Are you sure you want to delete this appointment?')" OnClick="btnDeleteShift_Click" CausesValidation="false" />
So when the User clicks OK in the javascript confirmation box, I will execute the code to delete:
protected void RadScheduler1_AppointmentCommand(object sender, AppointmentCommandEventArgs e) { if (e.CommandName == "Delete") { RadScheduler1.DeleteAppointment(e.Container.Appointment, false); } }
The Problem with this is that when the appointment is deleted, the advancedEditForm will still be shown on screen with the values of the Appointment that have been deleted.
1. What code should I use that I can execute that closes that advancedEditForm ? I should execute that one under the AppointmentDelete Event.
2. Or, is there a code of the advanceeditform where can I use the existing Delete Confirmation Message Window of the appointment to be fired when I click My custom button, then afterwards closes the AdvancedEditForm?
3. Or, is there a built in Delete function of the AdvanceEditForm to show a delete button and provides the delete functionality?
From what I see, the appointment can be deleted only when I click the X button on the appointment in the radscheduler.
Hoping for your help and support.
Thank you very much,
Rommel
I want to delete the Appointment inside the AdvancedEditForm of RadScheduler. So I added a Button in the form with the following attributes.
<asp:Button ID="btnDeleteShift" runat="server" Text="Delete " Enabled="true" CommandName ="Delete" OnClientClick="return confirm('Are you sure you want to delete this appointment?')" OnClick="btnDeleteShift_Click" CausesValidation="false" />
So when the User clicks OK in the javascript confirmation box, I will execute the code to delete:
protected void RadScheduler1_AppointmentCommand(object sender, AppointmentCommandEventArgs e) { if (e.CommandName == "Delete") { RadScheduler1.DeleteAppointment(e.Container.Appointment, false); } }
The Problem with this is that when the appointment is deleted, the advancedEditForm will still be shown on screen with the values of the Appointment that have been deleted.
1. What code should I use that I can execute that closes that advancedEditForm ? I should execute that one under the AppointmentDelete Event.
2. Or, is there a code of the advanceeditform where can I use the existing Delete Confirmation Message Window of the appointment to be fired when I click My custom button, then afterwards closes the AdvancedEditForm?
3. Or, is there a built in Delete function of the AdvanceEditForm to show a delete button and provides the delete functionality?
From what I see, the appointment can be deleted only when I click the X button on the appointment in the radscheduler.
Hoping for your help and support.
Thank you very much,
Rommel