Skip to main content

dxTreeList

Namespace: Wisej.Web.Ext.DevExtreme

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

The TreeList is a widget that represents data from a local or remote source in the form of a multi-column tree view.

public class dxTreeList : dxBase

Constructors​

Instance member dxTreeList()​

Constructs a new instance of the dxTreeList class.

Example:

The following example creates a tree list that builds the hierarchy from the id and parentId fields of the rows.

var treeList = new dxTreeList();
treeList.Options.dataSource = new[]
{
new { id = 1, parentId = 0, name = "John Heart", title = "CEO" },
new { id = 2, parentId = 1, name = "Samantha Bright", title = "COO" },
new { id = 3, parentId = 1, name = "Arthur Miller", title = "CTO" }
};
treeList.Options.keyExpr = "id";
treeList.Options.parentIdExpr = "parentId";
treeList.Options.columns = new[] { "name", "title" };
treeList.Options.autoExpandAll = true;
treeList.Dock = DockStyle.Fill;
this.Controls.Add(treeList);

Instance member dxTreeList(options)​

Constructs a new instance of the dxTreeList class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a tree list with single row selection and expands the first root row.

var treeList = new dxTreeList(new
{
dataSource = departments,
keyExpr = "id",
parentIdExpr = "parentId",
columns = new object[]
{
"name",
new { dataField = "budget", dataType = "number", format = "currency" }
},
selection = new { mode = "single" },
expandedRowKeys = new[] { 1 },
showRowLines = true
});
treeList.Dock = DockStyle.Fill;
this.Controls.Add(treeList);

Implements​