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

Tell the difference between an update.

1 Answer 42 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 25 Sep 2008, 03:11 PM
Hi,

I believe this is the last issue with the scheduler that I need fixed.  I want to know if there's a way through code to tell the difference between when they update an appointment through an advanced form or when they simply drag the appointment to another date?  I want to do this in the AppointmentUpdate method.

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 26 Sep 2008, 01:52 PM
Hello Chris,

There is no straightforward way to get this info from the API, but we can use the AppointmentCommand event to mark the appointment as "edited through the form" and later use this info in the AppointmentUpdate event. Here is the code:

protected void  RadScheduler1_AppointmentCommand(object sender, AppointmentCommandEventArgs e) 
    if (e.CommandName.ToLowerInvariant() == "update"
    { 
        e.Container.Appointment.Attributes["__UpdatedThrougForm"] = "true"
    } 
 
protected void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e) 
    if (e.Appointment.Attributes["__UpdatedThrougForm"] == "true"
    { 
        // ... 
        e.Appointment.Attributes.Remove("__UpdatedThrougForm"); 
    } 
 

Let us know if this helps.

Greetings,
Tsvetomir Tsonev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Scheduler
Asked by
Chris
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or