- Home
- Forum
- ASP.NET Web Forms
- SerializationSettings.PreventDefaultValues = true is not saving custom properties
SerializationSettings.PreventDefaultValues = true is not saving custom properties
Hi, I have set this property:


DiagramWebControl.Model.SerializationSettings.PreventDefaultValues = true;
and I'm adding a node to the SymbolPalette like this:
Palette bpmnShapes = new Palette("BPMN Shapes");
BPMNNode node = new BPMNNode();
node.Name = name;
node.Width = width;
node.Height = height;
node.OffsetX = x + node.Width / 2;
node.OffsetY = y + node.Height / 2;
node.Shape = bpmnShape;
node.FillColor = fillColor != null ? fillColor : "white";
node.BorderWidth = 1.5;
node.BorderColor = border;
Label label = new Label() {
FontColor = "black",
Offset = new DiagramPoint() { X = 0.5f, Y = 0.5f },
Text = labelText,
Mode = LabelEditMode.View,
ReadOnly = true
};
node.Labels.Add(label);
node.Activity = BPMNActivity.Task;
AddPort(task); bpmnShapes.AppendChild(task);
DiagramSymbolPalette.Palettes.Add(bpmnShapes);
But when I save the diagram and load it again, the label offset is not saved.
SIGN IN To post a reply.
5 Replies
SG
Shyam G
Syncfusion Team
June 8, 2018 11:55 AM UTC
Hi David van Laar Veth,
The reported issue is a known issue. we have already fixed the issue and it will be available in our volume 2, release which is scheduled to release by 3rd week of June,2018.
Regards,
Shyam G
DV
David van Laar Veth
June 13, 2018 05:28 AM UTC
Thanks Shyam, good to hear.


I'm also having another issue with the PreventDefaultValues property:
When it is set to true, and when $("#DiagramWebControl").ejDiagram("instance").load(diagramJSON) is called more than once, an error is occurring and the diagram becomes blank. The error occurs in line 3651 of ej.diagram.min.js version 16.1.0.37
SG
Shyam G
Syncfusion Team
June 14, 2018 09:38 AM UTC
Hi David van Laar Veth,
We have logged “Exception raised while loading diagram twice when PreventDefaultValues set as true” as a defect. The fix for this issue is estimated to be available on volume 2 service pack 1 release which is scheduled to release by end of July,2018. As a workaround, please set EnableContextMenu property as false to resolve your reported issue.
Code example:
DiagramWebControl.EnableContextMenu = false;
Regards,
Shyam G
DV
David van Laar Veth
July 16, 2018 05:09 AM UTC
Hi Shyam,
I have updated to 16.2.0.41, but I'm still having the same issue - when I call diagram.save(); the labels do not include offset.
Regards,
David
SG
Shyam G
Syncfusion Team
July 17, 2018 05:34 AM UTC
Hi David van Laar Veth,
Sorry for the inconvenience.
We have missed to include “labels offset serialization issue” in our volume 2 release and it will be available in our volume 2 service pack 1 release which is scheduled to release by end of July,2018.
Regards,
Shyam G
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
-
DV David van Laar Veth
- Jun 8, 2018 01:11 AM UTC
- Jul 17, 2018 05:34 AM UTC