kendoTreeView
Namespace: Wisej.Web.Ext.Kendo
Assembly: Wisej.Web.Ext.Kendo (4.1.0.0)
The Kendo UI TreeView widget displays hierarchical data in a traditional tree structure.
- C#
- VB.NET
public class kendoTreeView : kendoBase
Public Class kendoTreeView
Inherits kendoBase
Constructors
kendoTreeView()
Constructs a new instance of the kendoTreeView class.
Example:
The following example creates a tree view and assigns its nodes through the Options property.
var treeView = new kendoTreeView();
treeView.Options.dataSource = new object[]
{
new
{
text = "Documents", expanded = true,
items = new[]
{
new { text = "Invoices" },
new { text = "Reports" }
}
},
new { text = "Pictures" }
};
treeView.Dock = DockStyle.Fill;
this.Controls.Add(treeView);
kendoTreeView(options)
Constructs a new instance of the kendoTreeView class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options. |
Example:
The following example creates a tree view and handles the select event on the server. The node field of the event data contains the text of the selected node.
var treeView = new kendoTreeView(new
{
dataSource = new object[]
{
new
{
text = "Inbox", expanded = true,
items = new[]
{
new { text = "Customers" },
new { text = "Suppliers" }
}
},
new { text = "Sent" }
}
});
treeView.Instance.onSelect += new WidgetEventHandler((s, e) =>
{
AlertBox.Show("Selected: " + e.Data.node);
});
treeView.Dock = DockStyle.Fill;
this.Controls.Add(treeView);