Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to make a readonly diagram ? (Read 3524 times)
Mohammad
YaBB Newbies
*
Offline


Hello everybody :)

Posts: 32
Joined: Oct 2nd, 2009
How to make a readonly diagram ?
Oct 21st, 2009 at 1:01am
Print Post  
Hi

I want to make diagramView readonly in some cases. It means to avoid users to create or change the diagram nodes and links and their positions.

I tried to do this by setting Behavior property to DoNothing in server side but it dosen't work! I use diagramView in JavaApplet mode and use ShapeListBox to add custom nodes to the diagram.

Is there ReadOnly property to both diagramView and shapeListBox?

Thank you.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to make a readonly diagram ?
Reply #1 - Oct 21st, 2009 at 9:46am
Print Post  
Hi,

Behavior only specifies what happens when you draw on the canvas with the mouse. Do you need to disable creating nodes using drag-and-drop from the ShapeListBox?

Stoyan
  
Back to top
 
IP Logged
 
Mohammad
YaBB Newbies
*
Offline


Hello everybody :)

Posts: 32
Joined: Oct 2nd, 2009
Re: How to make a readonly diagram ?
Reply #2 - Oct 21st, 2009 at 11:03am
Print Post  
Yes. All changes in diagram including drag&drop, delete, change positions and so on.

Diagram is a field in my form and when form is in view mode I should make all fields read only. 

Is there a solution?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to make a readonly diagram ?
Reply #3 - Oct 21st, 2009 at 11:45am
Print Post  
You could set ClientSideMode to ImageMap. The diagram can't be modified then, unless you add an InteractivityExtender.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Mohammad
YaBB Newbies
*
Offline


Hello everybody :)

Posts: 32
Joined: Oct 2nd, 2009
Re: How to make a readonly diagram ?
Reply #4 - Oct 21st, 2009 at 12:24pm
Print Post  
I tested your approach but it doesn't work. I changed the ClientSideMode to ImageMap in onClick evnet of a button on the form. The initial mode is JavaApplet.
But I can change the diagram still.
« Last Edit: Oct 28th, 2009 at 6:06am by Mohammad »  
Back to top
 
IP Logged
 
Mohammad
YaBB Newbies
*
Offline


Hello everybody :)

Posts: 32
Joined: Oct 2nd, 2009
Re: How to make a readonly diagram ?
Reply #5 - Nov 3rd, 2009 at 11:09am
Print Post  
Hi Stoyon

It seems there is no solution for this. right?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to make a readonly diagram ?
Reply #6 - Nov 3rd, 2009 at 12:12pm
Print Post  
Is the Java console icon displayed after you hit that button? If it's still there, perhaps there's some code that changes the mode back to JavaApplet later. If you can't see it anymore but can move nodes, then you probably have the InteractivityExtender enabled on that form.

Stoyan
  
Back to top
 
IP Logged
 
mark korn
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Dec 2nd, 2009
Re: How to make a readonly diagram ?
Reply #7 - Dec 18th, 2009 at 1:51pm
Print Post  
Hi
You can try this:


ClientSideMode.JavaApplet

1.Edit Mode

diagramView.ClientSideMode = ClientSideMode.JavaApplet;
diagramView.Enabled = true;
diagramView.Behavior = Behavior.DrawLinks;
               shapeList.ClientSideMode = ClientSideMode.JavaApplet;
foreach (DiagramNode node in diagram.Nodes)
{
node.EnabledHandles = AdjustmentHandles.All;
}


2.Read-only Mode:

diagramView.Enabled = false;
diagramView.Behavior = Behavior.DoNothing;
diagramView.NodeClickedScript = String.Empty;
shapeList.ClientSideMode = ClientSideMode.ImageMap;
diagram.ActiveItem = null;
foreach (DiagramNode node in diagram.Nodes)
{
node.EnabledHandles = AdjustmentHandles.None;
}



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