[app.component.ts]
<ejs-grid #Grid id='Grid' [dataSource]='parentData' [childGrid]='childGrid' (detailDataBound)="detailDataBoundParent($event)">
---
</ejs-grid>
[app.component.ts]
detailDataBoundParent(args) {
// this event triggered when expand the detail row of parent Grid
// get the childGrid instances and bind the detail-state-change event to the first-level child Grid
args.childGrid.on('detail-state-change', function(args) {
// this event triggered when expand/ collapse the detail row of first level childGrid
console.log(args);
});
}
|
[app.component.ts]
detailDataBoundParent(args) {
setTimeout(() => {
// get the instances of childGrid and expand its detail row programmatically
args.childGrid.detailRowModule.expand(0);
}, 100);
}
|