search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

api version

Asked by Andrea
8 years ago.

Hello, I downloaded the trial version of daypilot because I need to create a project using Scheduler web forms. I don't understand the difference between api=1 and api=2. What version do I use? Why I don't see in my Scheduler web control the api property?
Thanks

Answer posted by Dan Letecky [DayPilot]
8 years ago.

The ASP.NET WebForms version uses API v1 and it can't be changed.

The selected api affects how the client-side events are processed.

For api=1 only one event is fired for every action, depending on the "*Handling" property. Example

1. EventMoveHadling="CallBack"
When the user finishes drag and drop moving the Scheduler will fire EventMove event on the server side (using a CallBack).

2. EventMoveHandling="JavaScript".
When the user finishes drag and drop moving the Scheduler will fire EventMoveJavaScript event on the client side. If you want to fire the server-side event you need to call it manually form the event handler - dp.eventMoveCallBack().

When using api=2 (not supported in the ASP.NET WebForms version at the moment) the event handling process includes three phases:

1. onEventMove is fired
2. The default action specified using eventMoveHandling is fired
3. onEventMoved is fired

api=2 also uses different structure of event handler parameters (it is always one parameter - "args" - that holds all the properties).

Eventually, the ASP.NET WebForms version will also be switched to api=2.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.