TreeTable
Namespace: Wisej.Web.Ext.Webix
Assembly: Wisej.Web.Ext.Webix (4.1.0.0)
UI-related TreeTable inherits from view. Being a hybrid between DataTable and Tree, it shares a number of their properties and methods.
- C#
- VB.NET
public class TreeTable : wxBase
Public Class TreeTable
Inherits wxBase
Constructors
TreeTable()
Constructs a new instance of the TreeTable class.
Example:
The following example creates a tree table; the template {common.treetable()} renders the expand/collapse icon in the first column.
var table = new TreeTable();
table.Options.columns = new object[]
{
new { id = "value", header = "Task", fillspace = true, template = "{common.treetable()} #value#" },
new { id = "hours", header = "Hours", width = 80 }
};
table.Options.data = new[]
{
new
{
id = "1",
value = "Design",
hours = 12,
open = true,
data = new[]
{
new { id = "1.1", value = "Wireframes", hours = 5 },
new { id = "1.2", value = "Mockups", hours = 7 }
}
}
};
table.Dock = DockStyle.Fill;
this.Controls.Add(table);
TreeTable(options)
Constructs a new instance of the TreeTable class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options. |
Example:
The following example creates a tree table with selectable rows passing the columns and the hierarchical data to the constructor.
var table = new TreeTable(new
{
select = "row",
columns = new object[]
{
new { id = "value", header = "Folder", fillspace = true, template = "{common.treetable()} #value#" },
new { id = "size", header = "Size (MB)", width = 100 }
},
data = new[]
{
new { id = "1", value = "Documents", size = 320, data = new[] { new { id = "1.1", value = "Invoices", size = 120 } } },
new { id = "2", value = "Pictures", size = 850, data = new[] { new { id = "2.1", value = "Holidays", size = 600 } } }
}
});
table.Dock = DockStyle.Fill;
this.Controls.Add(table);