Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Scheduler and Reminder > Save Changes Automatically

Not answered Save Changes Automatically

Feed from this thread
  • Karl Master avatar

    Posted on Jan 18, 2012 (permalink)

    Hi,
    I was wondering if someone could help me, which event is best to call to save any changes made in the RadScheduler.At present I I use a button to save all changes using TableAdapters. I would like the changes saved automatically ie if resized, dragged or a appointment is opend edited and closed.

    I've tried the .Appointments.CollectionChanged and when adding an event using CustomEditAppointmentDialog it adds the appointment twice.

    Thanks

    Reply

  • Karl Master avatar

    Posted on Jan 19, 2012 (permalink)

    Think I sorted this, I added the

    AppointmentsRowChanged

    and the

    AppointmentsRowDeleted

     on the dataset and it seems to work ok

    Reply

  • Ivan Todorov Ivan Todorov admin's avatar

    Posted on Jan 20, 2012 (permalink)

    Hi Karl,

    I am glad that you have sorted this out.

    Indeed, this is the correct approach since RadScheduler always keeps the source collection consistent by updating it when this is needed.

    Should you have any future questions, do not hesitate to contact us.

    Greetings,
    Ivan Todorov
    the Telerik team

    SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).

    Reply

  • Mark avatar

    Posted on Apr 30, 2012 (permalink)

    If this helps anyone, here is what i did to get the rad scheduler to save the data:

    I followed the instructions in this video here (had to manually create an SQL CE database based on their sample access db):

    http://tv.telerik.com/winforms/radscheduler/codeless-data-binding-with-radscheduler-winforms

    But anytime i added or changed an appointment it wouldn't save it to the database.

    So i added this to my form load:

    radScheduler1.Appointments.CollectionChanged += new Telerik.WinControls.Data.NotifyCollectionChangedEventHandler(Appointments_CollectionChanged);

    And the event handler code is:

            private void Appointments_CollectionChanged(object sender, Telerik.WinControls.Data.NotifyCollectionChangedEventArgs e)
            {
                appointmentsTableAdapter.Update(this.schedulerdataDataSet.Appointments);
                this.schedulerdataDataSet.AcceptChanges();

                Console.WriteLine("Updated scheduler at " + DateTime.Now.ToString());
            }

    After doing that it actually saved the data to the database and seems to work now.

    Hope this helps.

    Reply

  • Ivan Todorov Ivan Todorov admin's avatar

    Posted on May 3, 2012 (permalink)

    Hi Mark,

    Thank you for sharing your solution with our community.

    Your Telerik points have been updated.

    Feel free to contact us whenever you need any help or you want to leave your feedback.

    Regards,
    Ivan Todorov
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Scheduler and Reminder > Save Changes Automatically
Related resources for "Save Changes Automatically"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]