Hi Oliver,
Greetings from Syncfusion Support.
We have prepared sample to customize the delete confirmation popup by having an additional dropdown field which can be view from the following link.
onPopupOpen(args: PopupOpenEventArgs) {
if (args.type === 'DeleteAlert') {
let content = args.element.querySelector('#QuickDialog_dialog-content');
let dropdown = createElement('div', { className: 'reason-dropdown' });
content.appendChild(dropdown);
if (!args.element.querySelector('.reason-dropdown').classList.contains('e-dropdownlist')) {
let dropDownListObject: DropDownList = new DropDownList({
width: "100%",
placeholder: 'Choose reason',
dataSource: ['Duplicate event', 'Unwanted event', 'Others']
});
dropDownListObject.appendTo(dropdown);
} else {
(args.element.querySelector('.reason-dropdown') as any).ej2_instances[0].value = null;
}
}
}
To programmatically close the confirmation popup, use the following code.
document.querySelector('.e-quick-dialog-cancel').click(); |
Regards,
Nevitha.