Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ResetDrag (Read 3101 times)
SimonL
YaBB Newbies
*
Offline



Posts: 36
Joined: Aug 11th, 2006
ResetDrag
Nov 26th, 2006 at 12:03pm
Print Post  
I have the calendar set to resources view. I drag an item to a new location and to a different date.

In the item_Modified event
I display a form dialog.  At this point the user makes a decision on whether to accept the move or not. In order to stop tracking mouse movement I have issued ResetDrag, but this of course has put the item back to its original position thus confusing the user.

I only want to stop tracking mouse events but not move the item back to its original posistion.

Can you advise please.

Regards,
Simon
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: ResetDrag
Reply #1 - Nov 27th, 2006 at 8:30am
Print Post  
Our developers implemented two new methods to help you achieve the desired logic. The methods are SuspendDrag and ResumeDrag. Invoke the first one to temporarily pause the current drag operation. Invoke the later one to resume a previously paused drag operation. The code in your case would be similar to the following:

Code
Select All
calendar.SuspendDrag()

' ...
' Display confirmation form
' ...

If confirmed Then
  calendar.ResumeDrag()
Else
  calendar.ResetDrag()
End If
 



You can download the most recent build of Planner.NET from here:
https://mindfusion.org/_planner/_Planner.NET_41pre_trial12_20.zip
(This is a temporary url and might not work in the future.)

Meppy
  
Back to top
 
IP Logged
 
SimonL
YaBB Newbies
*
Offline



Posts: 36
Joined: Aug 11th, 2006
Re: ResetDrag
Reply #2 - Nov 28th, 2006 at 5:27pm
Print Post  
Thanks Meppy.

I installed the new version and the suspend and resume drag operation worked perfectly.

However I now can't drag to create an item even though I haven't changed anything, the EnableDragCreate property is still true.

Regards,
Simon Lomax
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: ResetDrag
Reply #3 - Nov 29th, 2006 at 6:10am
Print Post  
This is interesting, because I am testing the new version here and I am able to create new items by dragging with the mouse. Is there a chance to send me your application or a part of it so that I can check what might be wrong?

Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint