We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Hierarchichal Use

Thread ID:





129630 Feb 25,2017 01:58 PM UTC Mar 27,2017 03:07 PM UTC ASP.NET Core 3
Tags: Grid
Asked On February 25, 2017 01:58 PM UTC


I have question regarding TreeGrid for ASP.NET Core.

My aim is to use the TreeGrid for the admin page of my site.

The admin page requires editing of data in 3 tables.

When i was looking at the documentation, I could not locate example on how to
add columns for detail tables, the example only shows columns for the main/root table.

Could please provide an example of how to insert, update, list and delete data in suggested hierarchy?

Many Thanks,


Manikandan Manikam [Syncfusion]
Replied On February 28, 2017 05:42 AM UTC

Hi Amir,  
Currently TreeGrid only supports data collection from same table with parent-child relationship, we can’t create hierarchical structure with multiple table’s data collection. 
Grid control supports relational binding support with multiple tables, please find the demo link below. 
Can you please check this sample and let us know whether this meets your requirement? 
Manikandan M. 

Replied On March 25, 2017 09:15 AM UTC

Hi Manikandan,

Yes, I think your suggestion will cover my requirements. 

Many Thanks,


Jayaprakash Kamaraj [Syncfusion]
Replied On March 27, 2017 03:07 PM UTC

Hi Amir, 
Based on your request we have created  a Grid sample with Hierarchy in ASP.NET core that can be downloaded from the following link. 
<ej-grid id="Grid" datasource=ViewBag.parent allow-paging="true"  
    child-grid="@(new GridProperties() { 
    QueryString = "EmployeeID", 
    EditSettings = new EditSettings() { 
        AllowEditing =true, AllowAdding=true, AllowDeleting=true 
    ToolbarSettings = new ToolbarSettings() { 
        ShowToolbar = true, 
        ToolbarItems = new List<string>() { 
            "add", "edit", "delete", "update", "cancel" 
        } }, 
    DataSource = new DataSource() { 
        Json = ViewBag.child1, 
        InsertURL = "/Home/CellEditInsert", 
        UpdateURL = "/Home/CellEditUpdate", 
        RemoveURL = "/Home/CellEditDelete", 
        Adaptor = "remoteSaveAdaptor" 
    Columns = { new Column() { Field = "ID", IsPrimaryKey=true, HeaderText = "OrderID" }, 
                new Column() { Field = "EmployeeID", AllowEditing=false, HeaderText = "OrderID" }, 
                new Column() { Field = "CustomerID", HeaderText = "CustomerID" }, 
                new Column() { Field = "Freight", HeaderText = "Freight" }, 
                new Column() { Field = "ShipCity", HeaderText = "ShipCity" } 
    ChildGrid = new GridProperties() 
        QueryString = "CustomerID", 
        DataSource = new DataSource() { 
            Json = ViewBag.child2, 
            UpdateURL = "/Home/CellEditUpdate1", 
            RemoveURL = "/Home/CellEditDelete1", 
            Adaptor = "remoteSaveAdaptor" 
        EditSettings = new EditSettings() { 
            AllowEditing = true, AllowAdding = true, AllowDeleting = true 
        ToolbarSettings = new ToolbarSettings() { 
            ShowToolbar = true, 
            ToolbarItems = new List<string>() { "add", "edit", "delete", "update", "cancel" } 
        Columns = { 
            new Column() { Field = "CustomerID", IsPrimaryKey=true, AllowEditing=false, HeaderText = "CustomerID" }, 
            new Column() { Field = "CompanyName", HeaderText = "CompanyName" } 
Jayaprakash K.  


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon