We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Drag multiple nodes disabled when .EditStyle.AllowMoveY = false

Thread ID:

Created:

Updated:

Platform:

Replies:

98137 Feb 8,2011 04:01 PM Feb 16,2011 06:12 AM ASP.NET Web Forms (Classic) 1
loading
Tags: DiagramWebControl
John McAteer
Asked On February 8, 2011 04:01 PM

If I set nodes .EditStyle.AllowMoveY = false then when multiple nodes are selected and dragged together the nodes will not move.

Is this intentional?

Is there a workaround?

Thanks


Bala Murugan A.S [Syncfusion]
Replied On February 16, 2011 06:12 AM

Hi John,

Thanks for using Syncfusion Products.

Since by default the nodes will not move when the EditStyle.AllowMoveX and EditStyle.AllowMoveX property of the nodes is set to false. If your intention is to move the multiple nodes. We suggest you to set these properties to true for all selected nodes and after the nodes are deselected you can to reset these properties. Please refer the below code snippet to achieve this.
[C#]
this.diagram1.MouseUp += new MouseEventHandler(diagram1_MouseUp);
this.diagram1.EventSink.NodeDeselected += new NodeSelectedEventHandler(EventSink_NodeDeselected);
void EventSink_NodeDeselected(NodeSelectedEventArgs evtArgs)
{
if(evtArgs.Node !=null)
foreach (Node node in ProtectedNodes)
{
node.EditStyle.AllowMoveX = false;
}
}

void diagram1_MouseUp(object sender, MouseEventArgs e)
{

if(this.diagram1.Controller.SelectionList.Count >1)
foreach (Node node in this.diagram1.View.SelectionList)
{
if (node.EditStyle.AllowMoveX == false)
{
ProtectedNodes.Add(node);

}
node.EditStyle.AllowMove = true;
}

}

We have created a simple sample to demonstrate this and the same can be downloaded from the below link.
DragMultipleNodes-1216786198.zip

Please let me know if you have any concerns.

Regards,
Bala Murugan A.S




CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;