Class Group
Group is used to cluster multiple nodes and connectors into a single element. It acts like a container for its children (nodes, groups, and connectors).
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Syncfusion.JavaScript.DataVisualization.Models.Diagram
Assembly: Syncfusion.EJ.dll
Syntax
public class Group : NodeBase
Constructors
Group()
Initializes a new instance of the Group class.
Declaration
public Group()
Group(Group)
Initializes a new instance of the Group class.
Declaration
public Group(Group src)
Parameters
Type | Name | Description |
---|---|---|
Group | src |
Properties
CanUngroup
Gets or sets whether the group can be ungrouped or not
Declaration
[JsonProperty("canUngroup")]
public bool CanUngroup { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true |
Examples
DiagramProperties Model = new DiagramProperties();
Node Node1 = new Node() { Name = "node2", Width = 100, Height = 100 }; Model.Nodes.Add(node1);
Node Node2 = new Node() { Name = "node2", Width = 100, Height = 100 }; Model.Nodes.Add(node2);
Group Group = new Group() { Name = "Group", CanUngroup = false };
Group.Children.Add("Node1");
Group.Children.Add("Node2");
Model.Nodes.Add(Group);
PaddingBottom
Declaration
[JsonProperty("paddingBottom")]
public double PaddingBottom { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
PaddingLeft
Declaration
[JsonProperty("paddingLeft")]
public double PaddingLeft { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
PaddingRight
Declaration
[JsonProperty("paddingRight")]
public double PaddingRight { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
PaddingTop
Declaration
[JsonProperty("paddingTop")]
public double PaddingTop { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Type
Gets or sets node type as group
Declaration
[JsonProperty("type")]
public string Type { get; set; }
Property Value
Type | Description |
---|---|
System.String | "group" |
Examples
DiagramProperties Model = new DiagramProperties();
Node Node1 = new Node() { Name = "node2", Width = 100, Height = 100 }; Model.Nodes.Add(node1);
Node Node2 = new Node() { Name = "node2", Width = 100, Height = 100 }; Model.Nodes.Add(node2);
Group Group = new Group() { Name = "Group", CanUngroup = false, Type = "group" };
Group.Children.Add("Node1");
Group.Children.Add("Node2");
Model.Nodes.Add(Group);
Methods
AppendChild(String)
Insert the child to the children collection
Declaration
public void AppendChild(string childName)
Parameters
Type | Name | Description |
---|---|---|
System.String | childName |
Clone()
Performs a deep copy of the set of matched elements, meaning that it copies the matched elements as well as all of their descendant elements.
Declaration
public object Clone()
Returns
Type | Description |
---|---|
System.Object | object |