EditorTemplate delete does work in Scheduler
Hi,
I’m using an editortemplate in Scheduler but clicking delete button (see attached image) does not fire any event in code. It works for single events but not recurrence events.
What can I do to fix this? See attached sample code
Regards,
/Stefan
Attachment: SyncfusionScheduler_964d31c4.zip
SIGN IN To post a reply.
4 Replies
VM
Vengatesh Maniraj
Syncfusion Team
November 3, 2021 11:34 AM UTC
Hi Stefan,
Greetings from Syncfusion Support.
We have validated your reported issue “recurrence events not delete” with your shared sample and there you have canceled the action in OnActionBegin event when we remove the events. So we suggest removing the args.Cancel = true statement, we can delete all the appointments.
|
public void OnActionBegin(ActionEventArgs<ScheduleData.AppointmentData> args)
{
if (args.ActionType == ActionType.EventRemove) //To check for request type is event delete
{
args.Cancel = true; //To prevent the appointment deletion
}
} |
Kindly try the above solution and get back to us if you need any further assistance.
Regards,
Vengatesh
ST
Stefan
November 3, 2021 12:51 PM UTC
Hi ,
Thanks for quick reply!
That's NOT the problem. Run the attached project and delete the single event "Closed" and the methods
OnActionBegin and OnActionCompleted is called but if you click on any of the recurrence events and try to delete no method is called at all. Nothing happens when you click the delete button in the dialog (see image).
Hope you understand the problem.
Attachment: SyncfusionSchedulerOrg_d3e674c0.zip
VM
Vengatesh Maniraj
Syncfusion Team
November 4, 2021 09:16 AM UTC
Hi Stefan,
Thanks for the update.
We have validated your shared sample and we are able to replicate the issue. Currently, we are validating the issue at our end and will update the further details on November 08, 2021. We appreciate your patience.
Regards,
Vengatesh
VM
Vengatesh Maniraj
Syncfusion Team
November 9, 2021 06:00 AM UTC
Hi Stefan,
Thanks for the patience.
We have validated the sample and found the cause for this problem is that the CurrentAction is mismatched for the recurrence event. We have passed the Save action for all the events while opening the editor window. But for the recurrence events, we have to pass the CurrentAction as Editoccurrence like the below code.
|
public async Task OnEventClick(EventClickArgs<ScheduleData.AppointmentData> args)
{
args.Cancel = true;
CurrentAction action = CurrentAction.Save;
if(args.Event.RecurrenceRule != null)
{
action = CurrentAction.EditOccurrence;
}
await ScheduleRef.OpenEditorAsync(args.Event, action); //to open the editor on event click
} |
For more reference, please refer to the below sample.
Sample: https://www.syncfusion.com/downloads/support/forum/170109/ze/SyncfusionSchedulerOrg213497347
Please check the above sample and get back to us if you need any further assistance.
Regards,
Vengatesh
SIGN IN To post a reply.
- 4 Replies
- 2 Participants
-
ST Stefan
- Nov 2, 2021 04:04 PM UTC
- Nov 9, 2021 06:00 AM UTC