- Home
- Forum
- Angular - EJ 2
- Remove confirmation popup when dropping event
Remove confirmation popup when dropping event
How can remove confirmation popup when dropping event. Event should just drop without any confirmation?
Thanks)
Thanks)
SIGN IN To post a reply.
5 Replies
VM
Vengatesh Maniraj
Syncfusion Team
January 10, 2020 05:30 AM UTC
Hi Alexey,
Greetings from Syncfusion Support.
We can achieve this by using of addEvent method instead of using openEditor method in event drop events. We have prepared below sample based on the requirement.
In the above sample, we have used addEvent in onTreeDragStop method like below,
let eventData: { [key: string]: Object }
if (event.target.classList.contains('e-work-cells')) {
let cellData: CellClickEventArgs = this.scheduleObj.getCellDetails(event.target);
let resourceDetails: ResourceDetails = this.scheduleObj.getResourcesByIndex(cellData.groupIndex);
eventData = {
Id: filteredData[0].Id,
Name: filteredData[0].Name,
StartTime: cellData.startTime,
EndTime: cellData.endTime,
IsAllDay: cellData.isAllDay,
Description: filteredData[0].Description,
DepartmentID: resourceDetails.resourceData.GroupId,
ConsultantID: resourceDetails.resourceData.Id
};
}
// Handled the appointment drop for event target
let elem = closest(event.target, '.e-appointment');
if(elem){
let appointment: { [key: string]: Object } =this.scheduleObj.getEventDetails(elem) as any;
eventData = {
Id: filteredData[0].Id,
Name: filteredData[0].Name,
StartTime: appointment.StartTime,
EndTime: appointment.EndTime,
IsAllDay: appointment.isAllDay,
Description: filteredData[0].Description,
DepartmentID: appointment.DepartmentID,
ConsultantID: appointment.ConsultantID
};
}
this.scheduleObj.addEvent([eventData]);
Kindly try the above sample and revert us for further assistance with this.
Regards,
Vengatesh
AB
Alexey Bogdanov
January 10, 2020 07:36 AM UTC
This sample working for waiting list, when we dragging appointment to schedule.
How can remove confirmation popup when removed event from schedule.Actions:
- clicked by appointment on the schedule;
- clicked on delete icon (need remove appointment without modal popup)
Attachment below.
Attachment below.
Thanks)
Attachment: Actions_32dafdeb.zip
VM
Vengatesh Maniraj
Syncfusion Team
January 13, 2020 05:51 AM UTC
Hi Alexey,
Thanks for the update.
We have prepared the below sample based on the requirement. In this sample, we have used popupOpen event to prevent the DeleteAlert and delete the event without confirmation by making call of deleteEvent method.
onPopupOpen(args: PopupOpenEventArgs) {
if (args.type === 'DeleteAlert') {
args.cancel = true; // prevent the alert window
this.scheduleObj.deleteEvent((args.data as any).Id); // delete the event
}
}
Kindly try the above and let us know for further assistance.
Regards,
Vengatesh
AB
Alexey Bogdanov
January 13, 2020 07:28 AM UTC
Thanks.
It helped me)
VM
Vengatesh Maniraj
Syncfusion Team
January 14, 2020 04:03 AM UTC
Hi Alexey,
You are most welcome.
Regards,
Vengatesh
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
-
AB Alexey Bogdanov
- Jan 9, 2020 12:29 PM UTC
- Jan 14, 2020 04:03 AM UTC