kendoTreeList
Namespace: Wisej.Web.Ext.Kendo
Assembly: Wisej.Web.Ext.Kendo (4.1.0.0)
The TreeList enables the display of self-referencing tabular data and allows sorting, filtering, and data editing.
- C#
- VB.NET
public class kendoTreeList : kendoBase
Public Class kendoTreeList
Inherits kendoBase
Constructors
kendoTreeList()
Constructs a new instance of the kendoTreeList class.
Example:
The following example creates a tree list and assigns self-referencing rows through the Options property.
var treeList = new kendoTreeList();
treeList.Options.columns = new object[]
{
new { field = "name", title = "Name", expandable = true },
new { field = "position", title = "Position", width = 200 }
};
treeList.Options.dataSource = new[]
{
new { id = 1, parentId = (int?)null, name = "Jane Miller", position = "CEO" },
new { id = 2, parentId = (int?)1, name = "John Smith", position = "CTO" }
};
treeList.Dock = DockStyle.Fill;
this.Controls.Add(treeList);
kendoTreeList(options)
Constructs a new instance of the kendoTreeList class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options. |
Example:
The following example creates a sortable and filterable tree list bound to a list of rows linked through the parentId field.
var treeList = new kendoTreeList(new
{
sortable = true,
filterable = true,
dataSource = employees,
columns = new object[]
{
new { field = "name", title = "Name", expandable = true },
new { field = "position", title = "Position", width = 200 },
new { field = "hireDate", title = "Hired", format = "{0:d}", width = 120 }
}
});
treeList.Dock = DockStyle.Fill;
this.Controls.Add(treeList);