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.

Set DiagramWebControl edit state

Thread ID:

Created:

Updated:

Platform:

Replies:

103628 May 18,2012 05:51 AM May 21,2012 03:32 AM ASP.NET Web Forms (Classic) 1
loading
Tags: DiagramWebControl
Hsieh
Asked On May 18, 2012 05:51 AM

Hello

I'm trying to set the DiagramWebControl to be uneditable.
In the other words, all nodes and links can't be edit, move, delete or create a link.
Is there any property or method can easy to achieve?
Or I should make a lot of hard code? eg. detect node move => cancel node move...ect

thanks!!!

Amsath Ali M [Syncfusion]
Replied On May 21, 2012 03:32 AM

Hi

 

Thanks for your interest in Syncfusion products.

 

We suggest you to use the Node.EditStyle’s ‘AllowMoveX/Y, AllowChangeWidth/Height, AllowDelete and AllowRotate’ properties and set the Node’s ‘EnableCentralPort’ property as ‘false’ to make a node uneditable. Please refer the below code snippet to achieve your requirement.

 

Here is the code:

[C#]

Ellipse ellp = new Ellipse(100, 100, 100, 70);

                ellp.FillStyle.Color = Color.Aqua;

                ellp.FillStyle.Type = FillStyleType.LinearGradient;

 

                //To Make Ellipse uneditable

                // Node's Height cannot be changed.

                ellp.EditStyle.AllowChangeHeight = false;

                // Disables the changing of Node's Width

                ellp.EditStyle.AllowChangeWidth = false;

                //Indicates whether moving along X axis is allowed or not.

                ellp.EditStyle.AllowMoveX = false;

                //Indicates whether moving along Y axis is allowed or not.

                ellp.EditStyle.AllowMoveY = false;

                //Gets or sets a value indicating whether object can be deleted.

                ellp.EditStyle.AllowDelete = false;

                // Gets or sets a value indicating whether the object can be rotated.

                ellp.EditStyle.AllowRotate = false;

                // Gets or sets a value indicating whether central port is enabled.

                ellp.EnableCentralPort = false;

                ellp.Ports.Clear();

 

                DiagramWebControl1.Model.AppendChild(ellp);         

 

Here is the sample:

<a rel='nofollow' href='http://www.syncfusion.com/downloads/Support/DirectTrac/94299/F103628-DgmUnditable-993984491.zip'>F103628-DgmUnditable-1017764361.zip</a>

 

Please try the above sample and let us know if you have any queries.

 

Regards,

Amsath Ali. M



F103628-DgmUnditable_7b9dde3b.zip

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.

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.

;