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.
- C#
- VB.NET
public class igTreeGrid : igBase
Public Class igTreeGrid
Inherits igBase
Constructors
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);
igTreeGrid(options)
Constructs a new instance of the igTreeGrid class using the specified options.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial 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);