Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

Scheduler - Lesson 3 - How to Use Scheduler in complex views

$
0
0

When a Scheduler view is customized in a way more complex than just specifying the start date or decorating web element styles, you should pass the Scheduler settings to the corresponding overloads of the SchedulerExtension.GetAppointmentToInsert<T>, the SchedulerExtension.GetAppointmentsToUpdate<T> and the SchedulerExtension.GetAppointmentsToRemove<T> methods. Otherwise appointment display and operations may perform incorrectly.

This approach requires that the SchedulerSettings object is instantiated on server side and passed to the controller and to the view. So a special helper class SchedulerSettingsHelper is implemented that provides required settings for views and controllers within the application.

Question Comments

Added By: Oleg (DevExpress Support) at: 6/22/2014 11:35:25 PM    

Hello,

The NullReferenceException is raised while running this sample with version 14.1.3.

If you need to run this sample in version 14.1, please use the 14.1.4 (or newer) release.

Added By: John John Smith at: 4/3/2015 5:13:48 PM    

How is this supposed to work?  Do you have a sample project that actually works?  Example runner throws two errors when I try to run the example file.

also having problems with DBAppointment.  How can an object be:  DBAppointment and then DBAppointment[]?  I cannot resolve the error regarding implicitly converting DBAppointment[] to DBAppointment.

here in the controller:

DBAppointment insertedAppt = SchedulerExtension.GetAppointmentToInsert<DBAppointment>(SchedulerSettingsHelper.CommonSchedulerSettings,
               SchedulerDataHelper.GetAppointments(), SchedulerDataHelper.GetResources());
           SchedulerDataHelper.InsertAppointment(insertedAppt);

Added By: John John Smith at: 4/3/2015 6:14:27 PM    

I'm using Entity Framework.  Had to do this to get it working:

DBAppointment[] insertedAppt = SchedulerExtension.GetAppointmentToInsert<DBAppointment>(SchedulerSettingsHelper.CommonSchedulerSettings,
             SchedulerDataHelper.GetAppointments(), SchedulerDataHelper.GetResources());
         SchedulerDataHelper.InsertAppointment(insertedAppt.FirstOrDefault());


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>