2X faster development
The ultimate ASP.NET MVC UI toolkit to boost your development speed.
You can add Custom properties to Node and Connector. JavaScriptIn JavaScript, you can add custom properties directly into the node object. JS var nodes = []; var node = { name: "node", //custom properties for node email:"gs@gmail.com", phone:"23456678", } nodes.push(node); var connectors=[]; var connector = { name: "connector1", segments: [{ type:"straight" }], //custom properties for connectors email:"gs@gmail.com", phone:"23456678", }; connectors.push(connector); ASP.NET MVC and ASP.NETIn MVC and ASP.NET, custom properties for Node and Connector can be added by inheriting respective classes. The custom property can be retrieved at client side by setting attributes. Note: Custom properties must be serializable, else you cannot access it in client side.
EJMVC/EJWEB public class CustomNode:Node { private string email; private string phone; [JsonProperty("email")] [DefaultValue("")] public string Email { get { return email; } set { email = value; } } [JsonProperty("phone")] [DefaultValue("")] public string Phone { get { return phone; } set { phone = value; } } } CustomNode nodes = new CustomNode(); nodes.Name = "Rectangle"; //custom properties for node nodes.Email = "gs@gmail.com"; nodes.Phone = "23456678"; model.Nodes.Add(nodes); public class CustomConnector :Connector { private string email; private string phone; [JsonProperty("email")] [DefaultValue("")] public string Email { get { return email; } set { email = value; } } [JsonProperty("phone")] [DefaultValue("")] public string Phone { get { return phone; } set { phone = value; } } } CustomConnector connectors = new CustomConnector(); connectors.Name = "line"; //custom properties for connectors connectors.Email = "gs@gmail.com"; connectors.Phone = "23456678"; model.Connectors.Add(connectors);
|
2X faster development
The ultimate ASP.NET MVC UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.