Skip to main content

ejTreeGrid

Namespace: Wisej.Web.Ext.Syncfusion

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

The Essential JavaScript TreeGrid is an efficient control designed for representing the hierarchical data in a tabular format, combining the visual representation of Grid and TreeView controls. It represents the data from datasource such as array of JSON objects, ej.DataManager or self-referential datasource.

public class ejTreeGrid : ejBase

Constructors​

Instance member ejTreeGrid()​

Constructs a new instance of the ejTreeGrid class.

Example:

The following example creates the tree grid and binds it to a list of tasks that contain their sub tasks.

var treeGrid = new ejTreeGrid();
treeGrid.Options.dataSource = projects;
treeGrid.Options.childMapping = "SubTasks";
treeGrid.Options.treeColumnIndex = 1;
treeGrid.Options.columns = new[]
{
new { field = "TaskID", headerText = "ID" },
new { field = "TaskName", headerText = "Task" },
new { field = "Duration", headerText = "Duration" }
};
treeGrid.Dock = DockStyle.Fill;
this.Controls.Add(treeGrid);

Instance member ejTreeGrid(options)​

Constructs a new instance of the ejTreeGrid class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a sortable tree grid bound to a self-referential list, where each employee refers to the manager through the ManagerID field.

var treeGrid = new ejTreeGrid(new
{
dataSource = employees,
idMapping = "EmployeeID",
parentIdMapping = "ManagerID",
treeColumnIndex = 0,
allowSorting = true,
columns = new[]
{
new { field = "Name", headerText = "Name" },
new { field = "Title", headerText = "Title" }
}
});
treeGrid.Dock = DockStyle.Fill;
this.Controls.Add(treeGrid);

Implements​