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

Scheduler Event Move with ctrl key : NullReferenceException

Asked by Dominique
11 years ago.

Hi,

I want to move a Event with ctrl Key Down.
I copied the code from documentation.
.aspx
EventMoveHandling="CallBack"
ClientObjectName="dps"
OnEventMove="DayPilotScheduler1_EventMove"
EventMoveJavaScript="dps.eventMoveCallBack(e, newStart, newEnd, newResource, {ctrl: ctrl, shift: shift} )"

.cs
protected void DayPilotScheduler1_EventMove(object sender, DayPilot.Web.Ui.Events.EventMoveEventArgs e)
{
bool ctrl = (bool)e.Data["ctrl"];
// my code for update
}

When I execute the code, I have a NullReferenceException to the line " bool ctrl = (bool)e.Data["ctrl"]; "

I don't understand why ?
What I forgot in my code ?

Please help me.

Thanks

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

You need to change EventMoveHandling="CallBack" to EventMoveHandling="JavaScript".

It's now added to the documentation:

http://doc.daypilot.org/scheduler/event-copying/

Answer posted by Dominique
11 years ago.

Ok, it works.

Thanks.

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