Hi,
I am evaluating dhtmlxScheduler but am having issues getting the basic scheduler example working i.e. the section “Simple ASP.NET MVC application with Scheduler” in the .chm file provided with the download.
I am using Visual Studio 2010, and am creating a ASP.NET MVC 4 Web Application.
I have followed the instructions right through, and have ended up with a wep app that displays the basic scheduler and connects to the database successfully - when I create events in the calendar view, new events get created in the database.
However there were several issues:
-
The start_date and end_date in the events created are NULL. Using the debugger I can see that the updatedEvent object passed to the Save(Event eventDate, FormCollection formData) has NULL values for those dates, so they are not reaching the action.
-
When I select an event in the scheduler and update or delete an event, the Save(…) action does not get reached in the debugger and nothing happens.
-
The events in the database don’t get displayed when I return to the scheduler (which is not suprising since the dates are null, but it looks like that is not the only reason, see below).
The Samples\Scheduler.MVC3 project included in the evaluation download functions fully correctly (i.e. events can be created, modified etc. and all data correctly updates in the DB). Some observations from looking at that project, and copying/pasting code from it:
-
The Save action in the BasicSchedulerController in the sample project uses a different method signature to that in the tutorial (with an int? id first argument instead of an Event). Is the sample or tutorial more up to date, or can either be used, in which case which is considered best practice?
-
When I copy and paste the view and controller from the sample app in to a fresh project on their own, with a Model created as described in the tutorial, the start_date and end_date values for new events get passed through correctly to the database, but updating or deleting an event still doesn’t work (the Save action isn’t reached in the debugger).
Can anyone please advise no the above? I am a newbie to MVC (making the transition from Flex) so apologies in advance if I’ve made a newbie error!
Unfortunately I can’t try with an MVC 3 project - I get MVC 3 projects offered in VS2010 after some fiddling (see tedgustaf.com/en/blog/2011/4/ins … -2010-sp1/) but something must be corrupted since MVC 3 projects fail to compile since Mvc classes aren’t found. If it is confirmed that dhtmlxScheduler needs MVC 3 then I’ll redouble my efforts to fix that.
Best regards,
Kevin