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

[Solved] RecurrenceRule when Edit direct Appointment on panel of Scheduler

3 Answers 245 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
uy_2008
Top achievements
Rank 2
uy_2008 asked on 08 Mar 2008, 06:33 AM
Hi Telerik !
I have a problem when user Recurrence Rule , When I Edit one appoinment direct on panel of Scheduler and select type : Edit only recurring this occurrence .
But then , value of appointment select it's value of one row (It's never change value when select type Edit only recurring this occurrence ) :

DateTime StartTime = Convert.ToDateTime(e.ModifiedAppointment.Start);
DateTime EndTime = Convert.ToDateTime(e.ModifiedAppointment.End);


So , result it's false !!!!

So, You can help me about problem , how can get correct value of It (start time and end time that have modify ) ?

Thank you verry much !

3 Answers, 1 is accepted

Sort by
0
uy_2008
Top achievements
Rank 2
answered on 10 Mar 2008, 02:08 AM
Because when I update appointment direct on  panel of Radscheduler (example :move,change size ) ,and select type : Edit only recurring this occurrence .So then , result for all attribute of That Appointment it's never change anh always receive a default value for it (Value of that has ID is RecurrenceParentID of remain in type Recurrence Rule that have created ).
So I don't know how to get correct value (Start Time, End Time) for this appointment , that have choice to modify ?

I'm expecting for your reply with my problem !

Thank for your reply !
0
Accepted
Peter
Telerik team
answered on 10 Mar 2008, 12:47 PM
Hi Nguyen,

When working with recurrent appointments, please consider the following:

RadScheduler includes support for recurring events on hourly, weekly, daily, monthly and yearly basis. Exceptions to the recurrence rules are supported. This article provides an overview of the architecture and more examples and information can be obtained from the API reference.

To implement recurrence support the Appointment class includes the RecurrenceRule, RecurrenceParentID and RecurrenceState properties. An appointment can be made recurring either programmatically or using the advanced edit form. When an appointment is promoted into a recurring event its RecurrenceState changes to Master and the RecurrenceRule is populated with the string representation of the RecurrenceRule.

The recurrence master is stored in the database and its occurrences are generated on the fly with RecurrenceState set to Occurrence.

If the user modifies an individual appointment occurrence he creates an exception. The master is modified to include the date and time of the exception so no occurrence will be generated. Then the exception is stored in the database and its RecurrenceParentID property is set to reference the original master. This way the exception can still be linked to the original recurrence series.

Everytime you edit an individual appointment from the series and save the changes, you also insert a new appointment. If you need to capture the modified value, you should attach on the  AppointmentInsert event:

protected void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e)  
    {  
        Appointment modified_ap = e.Appointment;  
    } 



Greetings,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
uy_2008
Top achievements
Rank 2
answered on 11 Mar 2008, 02:55 AM
hi peter !
Thank you very much for your help and reply !
I have just try with your help , use event :
protected void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e)
{
           // get value for modify
}

So , It work so good !

(Because ,Previous I used event :
protected void radSchedulerTask_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
{
  // get value for modify
}


So it's not receive correct value that had modify ! )

Thank you very much again ! :D


Tags
Scheduler
Asked by
uy_2008
Top achievements
Rank 2
Answers by
uy_2008
Top achievements
Rank 2
Peter
Telerik team
Share this question
or