Columns and data for child grid

Hi Team,


I have below array of employee objects

employee : [
{
empSettings: {name: Array(0)}
isexist: false
time: 2pm
empEdit: true
enabled: true
empAdd: true
isManulTripUpdate: false
id: 1
status: true
tasks: [{…}{…}{…}{…}] 
 },
{
empSettings: {name: Array(0)}
isexist: false
time: 2pm
empEdit: true
enabled: true
empAdd: true
isManulTripUpdate: false
id: 2
status: true
tasks: [{…}{…}{…}{…}] 
 },
{
empSettings: {name: Array(0)}
isexist: false
time: 2pm
empEdit: true
enabled: true
empAdd: true
isManulTripUpdate: false
id: 3
status: true
tasks: [{…}{…}{…}{…}]    ------------------------> need to use for child grid
 } 
]
I have displayed one level of data but if i want display child grid i need tasks array to display for each employee if we expand so we can know for each employee how many tasks we have.

How do i need to give the child data. please help

Regards,
Bhavya

1 Reply

RR Rajapandi Ravi Syncfusion Team April 9, 2020 12:50 PM UTC

Hi Bhavya, 

Greetings from syncfusion support 

From checking your datasource, we understand you want maintain the Sub child for the parent. So we suggest you to use the TreeGrid for your requirement. Please refer the below TreeGrid Demo for more information. 



Regards,
Rajapandi R 


Loader.
Up arrow icon