AppointmentEditingEventArgs.AppointmentEditAction

4 posts, 0 answers
  1. Ranjit
    Ranjit avatar
    5 posts
    Member since:
    Jul 2016

    Posted 29 Jul Link to this post

    Hello,

    What is the equivalent to this action in ScheduleView. I am checking this condition .
    if (e.AppointmentEditAction == AppointmentEditAction.Edit           
                    && e.Source == ctlRadScheduler  // This is necessary to prevent an infinite loop of AppointmentEditing calls
                    )

    in my ctlRadScheduler_AppointmentEditing Event. This function is written in Old 2003 version of Schedular and we re migrating to new 2016 . ANy help is appreciated.

    Thank you
    Ranjit

  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 01 Aug Link to this post

    Hi Ranjit,

    There isn't a direct equivalent, however, if you provide us with more details on the scenario -  why you need AppointmentEditing event, what's happening in the event handler, etc, we will try to find a suitable way to achieve it with RadScheduleView.

    Looking forward to your reply.

    Regards,
    Yana
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. DevCraft banner
  4. Ranjit
    Ranjit avatar
    5 posts
    Member since:
    Jul 2016

    Posted 08 Aug in reply to Yana Link to this post

    Good Morning Yana,

    Thank you for your reply. We are migrating the code from old SL Telerik to new. We have inherited this code from previous developers.

    Here is the code, I commented to see if I can compile the project, it id compile. However we are not sure what the functionality is. Please let me know if you want me to share the project I can zip and upload.

     void ctlRadScheduler_AppointmentEditing(object sender, AppointmentEditingEventArgs e)
            {
                e.Cancel = true;
                
                //if (e.AppointmentEditAction == AppointmentEditAction.Edit           
                //    && e.Source == ctlRadScheduler  // This is necessary to prevent an infinite loop of AppointmentEditing calls
                //    ) Cheging this to just compile only. R.B 07/29/2016
                if(e.Source==ctlRadScheduler)
                {
                    Appointment targetAppt = (Appointment)e.Appointment;
                    App app = (App)Application.Current;
                    if (app.Context == APP_CONTEXT_OVERVIEW)
                    {
                        AppointmentUniqueIdComponents components = decodeAppointmentUniqueId(targetAppt.UniqueId);

                        HtmlPage.Window.Invoke("OnSchedulerAppointmentDoubleClick",
                            new string[] { components.tdefId.ToString(), components.deadline.ToString() });
                    }
                    else
                    {
                        MessageBox.Show(targetAppt.ToString(), "Assignment Details", MessageBoxButton.OK);
                    }
                }
            }

  5. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 11 Aug Link to this post

    Hello Ranjit,

    I cannot tell what the code in the event is used for, but as far as I can see, the event is canceled  ( the same can be used with RadScheduleView) and the check for EditMode could be replaced by checking e.IsDeleted - if it is false, the appointment is edited

    Let me know whether this helps.

    Regards,
    Yana
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top