Skip to main content

igTreeGrid

Namespace: Wisej.Web.Ext.Ignite

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

The igTreeGrid control is a jQuery widget that displays data in a tree-like tabular structure.

public class igTreeGrid : igBase

Constructors​

Instance member igTreeGrid()​

Constructs a new instance of the igTreeGrid class.

Example:

The following example creates a tree grid and binds it to a flat list of employees, where the ManagerId field of each item refers to the Id of the parent item.

var grid = new igTreeGrid();
grid.Options.dataSource = employees;
grid.Options.primaryKey = "Id";
grid.Options.foreignKey = "ManagerId";
grid.Options.autoGenerateColumns = true;
grid.Dock = DockStyle.Fill;
this.Controls.Add(grid);

Instance member igTreeGrid(options)​

Constructs a new instance of the igTreeGrid class using the specified options.

NameTypeDescription
optionsObjectInitial set of options passed to the igTreeGrid widget: an anonymous object, a JSON string or a dynamic object.

Example:

The following example creates a tree grid bound to a hierarchical list of employees, where each item contains its child items in the Reports field.

var grid = new igTreeGrid(new
{
dataSource = employees,
primaryKey = "Id",
childDataKey = "Reports",
autoGenerateColumns = false,
columns = new[]
{
new { key = "Id", headerText = "Id", dataType = "number" },
new { key = "Name", headerText = "Name", dataType = "string" },
new { key = "Title", headerText = "Title", dataType = "string" }
},
initialExpandDepth = 1
});
grid.Dock = DockStyle.Fill;
this.Controls.Add(grid);

Implements​