10894 : I do not get the OnTimeItem_BeforeMove event.

Question

Using the AJAX implementation of GTP.NET, I do not get the OnTimeItem_BeforeMove event. How am I supposed to know the amount of time a TimeItem has been moved in the AfterMove event?

What I want to do is to update all linked TimeItems on the right by the amount of time the moved one was changed.

Answer

The OnTimeItem_BeforeMove event if fired before the values are applied to Start and Stop of the time item. The amount moved is only available in the event arguments e.Diff.

You have the option to change the e.Diff value if you need to. Setting it to zero is an effective way of nulling out the move entirely.

Knowing this you can iterate the linked time items and add e.Diff to their start and stop properties (move backwards will give negative e.Diff values).