AppointmentAdded/Update Event

7 posts, 1 answers
  1. ALEX
    ALEX avatar
    61 posts
    Member since:
    Feb 2011

    Posted 04 Jan 2017 Link to this post

    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,

     

  2. Hristo
    Admin
    Hristo avatar
    1508 posts

    Posted 04 Jan 2017 Link to this post

    Hello Alex,

    Thank you for writing.

    The proper way to listen for changes in the scheduler 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.
  3. Hristo
    Admin
    Hristo avatar
    1508 posts

    Posted 04 Jan 2017 Link to this post

    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.
  4. ALEX
    ALEX avatar
    61 posts
    Member since:
    Feb 2011

    Posted 04 Jan 2017 Link to this post

    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#.

     

  5. Answer
    Hristo
    Admin
    Hristo avatar
    1508 posts

    Posted 04 Jan 2017 Link to this post

    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.
  6. ALEX
    ALEX avatar
    61 posts
    Member since:
    Feb 2011

    Posted 06 Jan 2017 in reply to Hristo Link to this post

    Dear Hristo,

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

    Regards,

  7. Hristo
    Admin
    Hristo avatar
    1508 posts

    Posted 09 Jan 2017 Link to this post

    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.
Back to Top