BeginDrag and CustomAppointmentFactory in RadScheduler

4 posts, 1 answers
  1. Andreas Haeusler
    Andreas Haeusler avatar
    25 posts
    Member since:
    Nov 2009

    Posted 18 Dec 2014 Link to this post

    I recently upgraded an application from 2014 Q1 to the most recent 2014 Q3 release.
    Now I experience a change in behaviour regarding drag + drop.

    On every BeginDrag the RadScheduler triggers the IEvent CreateNewAppointment() in our CustomAppointmentFactory which in turn creates (unwanted) records in a database. Is this the expected/neccessary behaviour or can it be reverted to the old behaviour?

    Kind regards,
    Andreas
  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 23 Dec 2014 Link to this post

    Hello Andreas,

    Thank you for writing.

    Please note that we made a lot of improvements in our scheduler control in Q2 2014. In this particular case this is the default behavior and it is not recommended to change it (every time a new appointment is created the AppointmentFactory class should be used). In addition this is not a proper place to add the appointments to the database (you cannot be sure that the appointment is actually added to the scheduler, and you will have a blank appointment since it is just created). To track such changes you can use the respective events of the scheduler (AppointmentAdded, AppointmentDeleted) or you can use the Appointments.CollectionChanged event.

    I hope this information helps.

    Regards,
    Dimitar
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Andreas Haeusler
    Andreas Haeusler avatar
    25 posts
    Member since:
    Nov 2009

    Posted 05 Jan 2015 in reply to Dimitar Link to this post

    Hello Dimitar,


    sorry for the late response (holidays blah blah)....

    Your suggestion regarding the event AppointmentAdded is greatly appreciated -- we need to create the Database entries as early as possible (multi- user environment, each time slot can be used only once), prior to Q2 2014 the AppointmentFactory was only triggered when an Appointment was actually created (not during drag/drop). But as you wrote, the event AppointmentAdded works. So that's where we moved the code to and all is good.

    Thanks.


    Kind regards,
    Andreas
  5. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 06 Jan 2015 Link to this post

    Hello Andreas,

    Thank you for writing back.

    I am glad I could be of help. Let us know if you have any other questions.
     
    Regards,
    Dimitar
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top