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

AppointmentAdded/Update Event

6 Answers 108 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
ALEX
Top achievements
Rank 1
ALEX asked on 04 Jan 2017, 07:12 AM

Hi,

 

I'm using Scheduler(RadWinForms Ver 2011.3.11.1219) for my project. Now, i want to insert/update back the "Appointment" information to my database after user click "Ok" or Cancel from "Edit Appointment Dialog form". I do not see any event for after added/updated the schedule control. I saw below event on RadSchedule

- AppointmentDeleted

- AppointmentDeleting

- AppointmentSelected

- AppointmentSelecting

 

How can i know the changes or newly add of appointment after user close or click ok/cancel from "Edit Appointment" form.

 

Regards,

 

6 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 04 Jan 2017, 07:57 AM
Hello Alex,

Thank you for writing.

The proper way to listen for changes in the appointments is to handle the CollectionChanged event of the Appointments collection. Please check the following thread discussing a similar question: http://www.telerik.com/forums/appoint-changed-event-in-vb-net.

I hope this helps. Should you have further questions please do not hesitate to write back.

Regards,
Hristo
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Hristo
Telerik team
answered on 04 Jan 2017, 09:49 AM
Hello Alex,

I would like to follow back with some additional information.

If you are actually using a version of the controls later than Q3 2014 SP1 you can directly subscribe the control to the AppointmentChanged event. It is the same as handling CollectionChanged on the Appointments collection and listening for ItemChanged action. 

I hope this helps. Let me know if you have additional questions.

Regards,
Hristo
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
ALEX
Top achievements
Rank 1
answered on 04 Jan 2017, 11:58 AM

Hi Hristo,

       Thanks for your reply and follow up on my question.

       I'm using 2011Q3. I do not see that event on my schedule. You shared the link is using VB.net. Please provide me the sample if you have sample with c#.

 

0
Accepted
Hristo
Telerik team
answered on 04 Jan 2017, 01:31 PM
Hi Alex,

Thank you for writing back.

I assumed that you might be using an older version not exposing the AppointmentChanged event. Please see my code snippet below how you can subscribe to the CollectionChanged event of the Appointments collection and handle it whenever an item changes: 
public Form1()
{
    InitializeComponent();
 
    this.radScheduler1.Appointments.CollectionChanged += Appointments_CollectionChanged;
}
 
private void Appointments_CollectionChanged(object sender, Telerik.WinControls.Data.NotifyCollectionChangedEventArgs e)
{
    if (e.Action == NotifyCollectionChangedAction.ItemChanged)
    {
        Console.WriteLine(e.PropertyName + " | " + e.Action);
    }
}

I hope this helps. Please let me know if you need further assistance.

Regards,
Hristo
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
ALEX
Top achievements
Rank 1
answered on 07 Jan 2017, 03:02 AM

Dear Hristo,

       Thanks again. It keep looping whatever i changes on Edit Appointment. Anyway it solved to my issue as per your example.

Regards,

0
Hristo
Telerik team
answered on 09 Jan 2017, 12:51 PM
Hello Alex,

I am glad that you have achieved the desired behavior in your actual project.

Please let me know if you need further assistance.

Regards,
Hristo
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Scheduler and Reminder
Asked by
ALEX
Top achievements
Rank 1
Answers by
Hristo
Telerik team
ALEX
Top achievements
Rank 1
Share this question
or