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

NewResource property in eventmoved event handler does not give the correct value after postback

Asked by Vijith
11 years ago.
After upgrading from Daypilot 5.4 to 6.0 the NewResource property in eventmoved event handler does not give the correct value after postback. After the upgrade the drag and drop was not working when dragging event from one column to another. On further inspection of code I could see that the NewResource property is having the same value in the OldResource property.
Comment posted by Vijith
11 years ago.
We tried using the new version(6.1) also. Still we have the same problem. Any help would be appreciated.
Comment posted by Dan Letecky
11 years ago.

Are you using Calendar or Scheduler?

Does it work correctly if you switch EventMoveHandling to "CallBack"?

Comment posted by Vijith
11 years ago.
We are using daypilot calendar. I tried with callback also. It is not working. In our application we are using the javascript mode. After getting the event in javascript I do a postback by explicitly calling the postback method from client side.
Comment posted by Nihas
11 years ago.

Detaiing the issue mentioned above as we are still facing the issue:

We were using the Daypilot 5.4 and for the Calndar control event move property we were using the code as below to set the event move attributes.

EventMoveHandling="JavaScript"

EventMoveJavaScript="MoveConfirm(dpcTest,e, newStart, newEnd, oldColumn, newColumn);"

here it was working fine and we were getting the e.NewResource property and e.OldResource property was set correctly when we move the event in resource view. Also please note that we were displaying a confirm javascript message before we call the "DaypilotControl.eventMovePostBack(e, newStart, newEnd, oldColumn, newColumn);" method and explicitly calling this postback method from client side inside the js function.

But now we are trying to upgrade to latest daypilot control(DayPilot Pro for ASP.NET 6.2 SP5). But here we are facing the issue when we use the same code mentioned above. Getting the e.NewResource property and e.OldResource property hassame value so not able to move the event to different column. But it can be moved to same column.

As you mentioned before to use call back,we havetried as below but the problem here is we are not able to show the script message. Showing the confirm message is required one.

EventMoveHandling="PostBack"
EventMoveJavaScript="if (confirm('Do you want to reschedule this appointment? ')){dpc1.eventMoveCallBack(e, newStart, newEnd, oldColumn, newColumn);} else { return false;}"

Here we specified the "PostBack" explicitly as we need a post back inthe page as the callback does not post back. So showing the javascript confirm message is an issue now. Could you please help us to solve this issue? How can we get the resource(new,old) property value set correctly. Or how can we show the js message , post back action together. Please help.

Thanks and Regards,

Nihas

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