Thanks for contacting Syncfusion Forums.
QUERY: Render Tree Grid on expanding row
We have achieved your requirement by rendering the Tree Grid in the column Template of Tree Grid. In column template, we have checked whether the row is parent or child using the property "hasChildRecords". If the row is child row, we have rendered Tree Grid for that row.
Please check the below code snippet,
|
<ejs-treegrid #treegrid [dataSource]='data' height='400'
childMapping='subtasks' [treeColumnIndex]='0'>
<e-columns>
<e-column headerText='Task ID' isPrimaryKey='true'
width='90' textAlign='Left' >
<ng-template #template let-data>
<span *ngIf="data.hasChildRecords">{{data.taskID}}</span>
<div *ngIf="!data.hasChildRecords">
<ejs-treegrid id='treegrid{{data.taskID}}'
[dataSource]='data1' height='200' childMapping='subtasks'
[treeColumnIndex]='0' >
<e-columns>
<e-column field='taskID' headerText='Task ID'
isPrimaryKey='true' width='90' textAlign='Left' >
</e-column>
</e-columns>
</ejs-treegrid>
</div>
</ng-template>
</e-column>
</e-columns>
</ejs-treegrid> |
Please check the below sample,
Please check the below help documentations,
Kindly get back to us for further assistance.