Hierarchical grid structure property query string

Hello,

is there a possibility to bing data in hierarchical structure having different column names for binding?

For example my column names are ID and ParentId.

My data is:
ID: 1, ParentId: null

My child data is:
ID: 2, ParentId: 1
ID: 3, ParentId: 1

My second child data id:
ID: 4, ParentId: 2

And I want to bind ID with ParentId that my grid to look like this:
--ID:1
----ID:2
------ID:4
----ID:3


1 Reply

PE Punniyamoorthi Elangovan Syncfusion Team June 19, 2018 02:31 PM UTC

Hi AC, 
Thank you for contacting Syncfusion support. 
Currently we don’t have support for TreeGrid component in Essential JS 2. We can achieve your requirement with Essential JS1 TreeGrid by using Self-Referential data binding. TreeGrid is rendered from Self-Referential data structures by providing two fields, ID field and parent ID field. The ID field contains unique values used to identify nodes and its name is assigned to the idMapping property. The parent ID  field contains values that indicate parent nodes and its name is assigned to the parentIdMapping property. 
We have prepared the sample for your reference please find the sample link below 
Please find more details about Self-Referential Data Binding is here. 
Please let us know if you require further assistance on this. 
Regards, 
Punniyamoorthi 
 


Loader.
Up arrow icon