We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Confirm Box in Drag & Drop?

it is possible to add a UI Confirm box before to complete a drag & drop meeting action over the SFSchedule? I tried many ways to do that but I can not get the expected result.  Something like that

//....

private void Handle_AppointmentDrop(object sender, Syncfusion.SfSchedule.XForms.AppointmentDropEventArgs e)

{

e.Cancel = MyConfirmDialogRoutine().Result //because is an Async Operation and the event handler only is Sync

}




3 Replies

SP Subburaj Pandian Veluchamy Syncfusion Team June 19, 2019 01:05 PM UTC

Hi Adan, 
 
Thank you for contacting Syncfusion support. 
 
Based on the provided information your requirement “Getting alert window when dropping the appointment”. As AppointmentDrop event is synchronous process, using this in asynchronous way is not the recommended one. As of now we don’t have any direct support to achieve this requirement. As a work around, this requirement can be achieved by using corresponding appointment (will have original start and end time) instance removed and added from DataSource of schedule and it automatically re-positioned to the original StartTime and EndTime of appointment.  
 
Please refer the following code for the same, 
 
[C#] 
private async void Schedule_AppointmentDrop(object sender, AppointmentDropEventArgs e) 
        { 
            bool CanDrop = await contentPage.DisplayAlert("Drop Appointment", "Would you like to drop the appointment", "Yes", "No"); 
            if (!CanDrop) 
            { 
                RepositioningAppointment(e.Appointment as ScheduleAppointment); 
            } 
        } 
 
We have prepared sample based on the AppointmentDrop as async method for this requirement. 
 
 
We hope that this helps you. Kindly, revert us if you have any concern. 
 
Regards,
Subburaj Pandian V



MD Misho Developer June 20, 2019 07:59 PM UTC

This works for me . Thanks !



SP Subburaj Pandian Veluchamy Syncfusion Team June 21, 2019 06:03 AM UTC

Hi Adan, 
 
Thank you for the update. We are glad that the given solution meets your requirement.

Please get in touch with us if you would require any further assistance in future. 
 
Regards,
Subburaj Pandian V  


Loader.
Live Chat Icon For mobile
Up arrow icon