Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
Delete Confirmation Message
posted

I need to run a function if the user clicked "YES" when given the delete appointment dialog box.  Is there any way to know what has been answered through code? 

 

Parents
No Data
Reply
  • 20872
    Verified Answer
    Offline posted

    Hello rmcneil,

    One way the you could follow here is something like the following one:

    1. Disable the default Prompt Dialog.
    2. Handle the BeforeAppointmentsDeleted event
    3. Create your own message box there.
    4. Decide what to happen if the yes is clicked.

    Please take a look at the code below:

     private void ultraDayView1_BeforeAppointmentsDeleted(object sender, BeforeAppointmentsDeletedEventArgs e) 
    {
         e.DisplayPromptMsg = false;
         if (MessageBox.Show("Caution - The Appointments will be deleted", "Caption", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
             {
                 //do what you need here
             }
          else
             { 
                  e.Cancel = true; 
             }
    }

    If you have any other questions please feel free to ask.

Children