BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi Jim
Thanks for using Syncfusion products.
Please note that instead of using “updateNode” API, you can assign value directly to the nodes “addInfo” property. Please refer the code snippet below.
Code snippet:
function save() {
var diagram = $("#Diagram1").ejDiagram("instance");
var dict = [];
dict.push({
key: "NodedatabaseId",
value: "154206"
});
diagram.model.nodes[0].addInfo = dict;
var saving = diagram.save()
var stringify = String(JSON.stringify(saving));
PageMethods.save(stringify);
}
Here is the sample:
Sample:http://www.syncfusion.com/downloads/support/forum/118510/WebApplication20_(2)1456199344.zip
Please let me know if any concerns.
Regards,
Shyam G
Hi Jim
Thanks for the update
Please note that in our previous update we have pushed the JSON data in an array and if you need to get the value from an array, please refer the code snippet below.
Code snippet:
function save() {
var diagram = $("#Diagram1").ejDiagram("instance");
//declare an dictionary object
var dict = [];
dict.push({
key: "NodedatabaseId",
value: "154206"
});
//add the dictionary object to the node addInfo property
diagram.model.nodes[0].addInfo = dict;
//get the dictionary from the node
var dictionary=diagram.model.nodes[0].addInfo[0].key
}
Please note that you can directly assign JSON data to an node’s addInfo property. Please refer the code snippet below
Code snippet :
function save() {
var diagram = $("#Diagram1").ejDiagram("instance");
//declare an dictionary object
var dict = { NodedatabaseId: 154206, Id: 2456 };
//add the dictionary object to the node addInfo property
diagram.model.nodes[0].addInfo = dict;
//get the dictionary value from the node addInfo property
var dictionary = diagram.model.nodes[0].addInfo.Id;
}
Please let me know if any concerns.
Regards,
Shyam G
Hi Jim
Thanks for the update.
Please note that if two or more arguments are passed to the jQuery $.extend() method, properties from all of the other objects are passed to the target object. If we misunderstood your requirement, could you please share us more details about your requirement such as video or code snippet or screenshot?. This will help us to verify further and provide a better solution to you. Please refer the below link which represents how to use jQuery extend.
Link:
http://api.jquery.com/jquery.extend/
please let me know if any concerns.
Regards,
Shyam G
Hi Jim
Thanks for the update.
Please let us know if you require further assistance on this.
Regards,
Shyam G