- Home
- Forum
- ASP.NET Web Forms
- How to disable all user interaction except "selecting" a node
How to disable all user interaction except "selecting" a node
Hi,
Some of our users will only have read-only access to diagrams.
I have tried the following in code behind during page load:
DiagramContent.Constraints = DiagramConstraints.None; // Disable all diagram interaction
This does not seem to work.
The user can select nodes, move them around, change text, etc.
What I need is to allow the user to do 1 thing - select a node.
Once selected I will then display associated properties in a separate window.
I have checked my Javascript and can find nowhere that I am overriding the diagram constraints.
Any suggestions?
Thanks
Jim
Some of our users will only have read-only access to diagrams.
I have tried the following in code behind during page load:
DiagramContent.Constraints = DiagramConstraints.None; // Disable all diagram interaction
This does not seem to work.
The user can select nodes, move them around, change text, etc.
What I need is to allow the user to do 1 thing - select a node.
Once selected I will then display associated properties in a separate window.
I have checked my Javascript and can find nowhere that I am overriding the diagram constraints.
Any suggestions?
Thanks
Jim
SIGN IN To post a reply.
6 Replies
SG
Shyam G
Syncfusion Team
June 22, 2015 01:29 PM UTC
Hi Jim
Thanks for using Syncfusion products.
Please note that the snippet(DiagramContent.Constraints = DiagramConstraints.None;) you have used to access the diagram as read-only is correct. If you need to perform certain operation in the diagram, when it is readonly, then it can be achieved using the click event. please refer the code snippet below.
Code snippet:
Diagram1.OnClientClick = "click";
Thanks for using Syncfusion products.
Please note that the snippet(DiagramContent.Constraints = DiagramConstraints.None;) you have used to access the diagram as read-only is correct. If you need to perform certain operation in the diagram, when it is readonly, then it can be achieved using the click event. please refer the code snippet below.
Code snippet:
Diagram1.OnClientClick = "click";
function click() {
console.log("click")
}
Please let me know if any concerns.
Regards,
Shyam G
JJ
Jim Jacobs
June 22, 2015 03:35 PM UTC
Hi Shyam,
Thanks for the clue to use the click event.
But, my real problem is that neither of the following work:
In code behind during page load:
DiagramContent.Constraints = DiagramConstraints.None;
In script during $(window).load:
$("#DiagramContent").ejDiagram({ constraints: ej.datavisualization.Diagram.DiagramConstraints.None });
The diagram remains completely editable by the user!
Is this a bug, or is there something else that I need to do?
Jim
Thanks for the clue to use the click event.
But, my real problem is that neither of the following work:
In code behind during page load:
DiagramContent.Constraints = DiagramConstraints.None;
In script during $(window).load:
$("#DiagramContent").ejDiagram({ constraints: ej.datavisualization.Diagram.DiagramConstraints.None });
The diagram remains completely editable by the user!
Is this a bug, or is there something else that I need to do?
Jim
SG
Shyam G
Syncfusion Team
June 23, 2015 12:35 PM UTC
Hi Jim
Thanks for your update.
We are able to reproduce the reported issue at our end. we have logged a defect report on this. Also we have created a support incident under your account to track the status of this issue.
Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents
However we suggest you to set the nodeconstraints as select to achieve your requirement. Also set the label property readOnly as true to disable the node editing. Please refer the code snippet below.
Code snippet:
Thanks for your update.
We are able to reproduce the reported issue at our end. we have logged a defect report on this. Also we have created a support incident under your account to track the status of this issue.
Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents
However we suggest you to set the nodeconstraints as select to achieve your requirement. Also set the label property readOnly as true to disable the node editing. Please refer the code snippet below.
Code snippet:
Node Task = new Node();
Label label = new Label();
//disable label editing
label.ReadOnly = true;
Task.Labels.Add(label);
//set node constraints
Task.Constraints = NodeConstraints.Select;
DiagramContent.Model.Nodes.Add(Task);
Please let me know if any concerns.
Regards,
Shyam G
JJ
Jim Jacobs
June 23, 2015 03:03 PM UTC
Hi Shyam,
Thanks for the code, but I don't think it work for me.
Your code sets label and node properties when they are created.
I need to be able to make the whole diagram editable for our standard users, and read-only for our visitors.
Hence a diagram that has already been created needs to be rendered in either edit or read-only mode at runtime.
So, I think I'll wait for the formal fix to be available.
Jim
Thanks for the code, but I don't think it work for me.
Your code sets label and node properties when they are created.
I need to be able to make the whole diagram editable for our standard users, and read-only for our visitors.
Hence a diagram that has already been created needs to be rendered in either edit or read-only mode at runtime.
So, I think I'll wait for the formal fix to be available.
Jim
SG
Shyam G
Syncfusion Team
June 24, 2015 09:16 AM UTC
Hi Jim
Thanks for your update.
We will inform you once the volume 2 release has been rolled out.
Please let me know if any concerns.
Regards,
Shyam G
Thanks for your update.
We will inform you once the volume 2 release has been rolled out.
Please let me know if any concerns.
Regards,
Shyam G
SG
Shyam G
Syncfusion Team
June 24, 2015 10:25 AM UTC
Hi Jim
Please ignore our previous update.
Please note that the reported issue will be included in our volume 2, release, which is scheduled to release in the end of June,2015.
Please let me know if any concerns.
Regards,
Shyam G
Please ignore our previous update.
Please note that the reported issue will be included in our volume 2, release, which is scheduled to release in the end of June,2015.
Please let me know if any concerns.
Regards,
Shyam G
SIGN IN To post a reply.
- 6 Replies
- 2 Participants
-
JJ Jim Jacobs
- Jun 21, 2015 05:57 PM UTC
- Jun 24, 2015 10:25 AM UTC