Changing appointment time and save it in database

4 posts, 0 answers
  1. Frederico Fernandes
    Frederico Fernandes avatar
    20 posts
    Member since:
    Oct 2009

    Posted 29 Sep 2011 Link to this post

    Hi,

    When i want to change appointment time without using Edit Appointment Dialog, which event is triggered?? I want to know which event is triggered because i want to update time in database.
  2. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 30 Sep 2011 Link to this post

    Hi Frederico,

    Thank you for your question.

    When an Appointment's property is changed, it notifies the collection which contains it. Therefore, you should handle the CollectionChanged event of the Appointments collection. The following code snippet demonstrates how you can achieve this:
    this.radScheduler1.Appointments.CollectionChanged += new NotifyCollectionChangedEventHandler(Appointments_CollectionChanged);
     
    void Appointments_CollectionChanged(object sender, Telerik.WinControls.Data.NotifyCollectionChangedEventArgs e)
    {
        if (e.Action == Telerik.WinControls.Data.NotifyCollectionChangedAction.ItemChanged)
        {
            if (e.PropertyName == "Start" || e.PropertyName == "Duration")
            {
                //do something
            }
        }
    }

    I hope you find this useful. If you have any further questions, do not hesitate to ask.

    Kind regards,
    Ivan Todorov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Bhaskara Rao
    Bhaskara Rao avatar
    2 posts
    Member since:
    Nov 2012

    Posted 24 Nov 2012 Link to this post

    i am trying to insert the appointment in the database how can i do that please post the code here
  5. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 29 Nov 2012 Link to this post

    Hi Bhaskara,

    A full walkthorugh of how to retrieve and persists data to a database is available in our online documentation.

    I hope this helps.

    All the best,
    Ivan Todorov
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
Back to Top