Skip to main content

Tree

Namespace: Wisej.Web.Ext.Webix

Assembly: Wisej.Web.Ext.Webix (4.1.0.0)

Tree is a widget that presents hierarchical data as a tree of nodes that can be expanded, collapsed and selected.

public class Tree : wxBase

Constructors​

Instance member Tree()​

Constructs a new instance of the Tree class.

Example:

The following example creates a tree with one expanded branch; the nested data collection defines the child nodes.

var tree = new Tree();
tree.Options.select = true;
tree.Options.data = new[]
{
new
{
id = "europe",
value = "Europe",
open = true,
data = new[]
{
new { id = "it", value = "Italy" },
new { id = "fr", value = "France" }
}
}
};
tree.Dock = DockStyle.Left;
this.Controls.Add(tree);

Instance member Tree(options)​

Constructs a new instance of the Tree class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a tree with two branches and selects a node after the tree is created.

var tree = new Tree(new
{
select = true,
data = new[]
{
new { id = "docs", value = "Documents", data = new[] { new { id = "docs.1", value = "Invoices" } } },
new { id = "pics", value = "Pictures", data = new[] { new { id = "pics.1", value = "Holidays" } } }
}
});
tree.Dock = DockStyle.Left;
this.Controls.Add(tree);

tree.Instance.open("docs");
tree.Instance.select("docs.1");

Implements​