Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Issue with drag drop (Read 1939 times)
Bala
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 156
Joined: Apr 21st, 2009
Issue with drag drop
Nov 3rd, 2012 at 11:34am
Print Post  
Hi Stoyo,

We want to use dragdrop on the diagram- tree nodes we are dropping on diagram nodes - with following code but it is not working:
Code
Select All
diagram.AllowDrop = true;
DragDrop.AddDropHandler(diagram, new DragEventHandler(diagran_DropEvent));
DragDrop.AddDragOverHandler(diagram, new DragEventHandler(diagran_DragOver));
 



but this was not working then we used thirdparty dragdropmanager class using below code:
Code
Select All
           DragAndDropManager.SetAllowDrop(diagram, true);
           DragAndDropManager.AddDropInfoHandler(diagram, new EventHandler<DragDropEventArgs>(diagran_DropEvent));
           DragAndDropManager.AddDropQueryHandler(diagram, new EventHandler<DragDropQueryEventArgs>(diagran_DragOver));
 



Now the drop is working but in a strange way - when we drop directly onto the diagram the dragover and drop event do not fire - when we drop on the nodes also the dragover events fire but drop do not fire - but when we drag an item over the node and cross it and drop it on diagram then the drop event gets fired.

We also tried setting node allowdrop and providing node drag/drop events but then also dropping on the node do not fire drop event.

What we are looking at is to get the drop event fired when we drop on the node. Could you please suggest as what could be the reason of this.

Thanks,
Bala
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Issue with drag drop
Reply #1 - Nov 5th, 2012 at 9:39am
Print Post  
Hi,

You can find a similar scenario implemented in the WorkflowDesigner sample project for listview items. I think you won't get DragDrop raised if e.Effects is left unset in the DragOver handler.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint