igTree
Namespace: Wisej.Web.Ext.Ignite
Assembly: Wisej.Web.Ext.Ignite (4.1.0.0)
The igTree control is a jQuery tree control that binds to UL HTML elements, JSON, XML, .NET collections, and remote data sources.
- C#
- VB.NET
public class igTree : igBase
Public Class igTree
Inherits igBase
Constructors
igTree()
Constructs a new instance of the igTree class.
Example:
The following example creates a tree and binds it to a hierarchical list where each item has the Name field and the child items in the Children field.
var tree = new igTree();
tree.Options.dataSource = departments;
tree.Options.bindings = new { textKey = "Name", childDataProperty = "Children" };
tree.Dock = DockStyle.Left;
this.Controls.Add(tree);
igTree(options)
Constructs a new instance of the igTree class using the specified options.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options passed to the igTree widget: an anonymous object, a JSON string or a dynamic object. |
Example:
The following example creates a tree that shows tri-state check boxes next to the nodes.
var tree = new igTree(new
{
dataSource = new[]
{
new
{
Name = "Europe",
Children = new[] { new { Name = "Italy" }, new { Name = "France" } }
},
new
{
Name = "Americas",
Children = new[] { new { Name = "Canada" }, new { Name = "Brazil" } }
}
},
bindings = new { textKey = "Name", childDataProperty = "Children" },
checkboxMode = "triState"
});
tree.Dock = DockStyle.Left;
this.Controls.Add(tree);