This is a migrated thread and some comments may be shown as answers.

AppointmentEditingEventArgs.AppointmentEditAction

3 Answers 103 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Ranjit
Top achievements
Rank 1
Ranjit asked on 29 Jul 2016, 09:22 PM

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

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 01 Aug 2016, 10:11 AM
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.
0
Ranjit
Top achievements
Rank 1
answered on 08 Aug 2016, 02:56 PM

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);
                }
            }
        }

0
Yana
Telerik team
answered on 11 Aug 2016, 10:02 AM
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.
Tags
ScheduleView
Asked by
Ranjit
Top achievements
Rank 1
Answers by
Yana
Telerik team
Ranjit
Top achievements
Rank 1
Share this question
or