Hi,
I've read your answer. It seems everything is okey, but the point 3 is not totally clear, that was my real concern when I open this ticket, rest of things are working perfectly.
My problem here is that I need a child grid and at the same time, a row details for the rows of the main grid. As you say I can get that filling up the detailRowTemplate of the main grid with someting like this:
<ng-template #detailTemplate let-data>
<div [hidden]="!data.isAttachmentDetailsVisible">Attachment details</div>
<div [hidden]="!data.isCommentDetailsVisible">Comment details</div>
<div [hidden]="!data.isLabelDetailsVisible">Label details</div>
<div [hidden]="!data.isAccountingDetailsVisible">Accounting details</div>
<ejs-grid #childGrid
[dataSource]="data.items">
<ng-template #detailTemplate let-data>
<div [hidden]="!data.isAttachmentDetailsVisible">Attachment for {{data.name}}</div>
<div [hidden]="!data.isCommentDetailsVisible">Comment nested details</div>
<div [hidden]="!data.isLabelDetailsVisible">Label nested details</div>
<div [hidden]="!data.isAccountingDetailsVisible">Accounting nested details</div>
</ng-template>
<e-columns>
<e-column field="id" [visible]="false"></e-column>
<e-column field="name" headerText="Document"></e-column>
<e-column field="state" headerText="Document"></e-column>
<e-column field="createdDate" headerText="Due date"></e-column>
<e-column field="amount" headerText="Amount"></e-column>
<e-column field="attachmentsNumber" headerTemplate="#attachment">
<ng-template #template let-data>
<ib-icon [icon]="'info'" (click)="showNestedDetails($event, data, 'isAttachmentDetailsVisible')"></ib-icon>
</ng-template>
</e-column>
<e-column field="comments" headerTemplate="#comment">
<ng-template #template let-data>
<ib-icon [icon]="'people'" (click)="showNestedDetails($event, data, 'isCommentDetailsVisible')"></ib-icon>
</ng-template>
</e-column>
<e-column field="labels" headerTemplate="#label">
<ng-template #template let-data>
<ib-icon [icon]="'plus'" (click)="showNestedDetails($event, data, 'isLabelDetailsVisible')"></ib-icon>
</ng-template>
</e-column>
<e-column field="accountingList" headerTemplate="#accounting">
<ng-template #template let-data>
<ib-icon [icon]="'lens'" (click)="showNestedDetails($event, data, 'isAccountingDetailsVisible')"></ib-icon>
</ng-template>
</e-column>
</e-columns>
</ejs-grid>
</ng-template>
But the problem is that I lose the control of the child grid throught the property childGrid of the parent grid. I mean,
for example I could do something like this (this.grid is the main GridComponent):
this.grid.childGrid.columns // getting access to the childColumn
if I were defined the childGrid by this way:
<ejs-grid #gridRef
[dataSource]='data'
[allowSorting]="true"
[childGrid]="childGrid"
I could have access all the properties, methods,.....
is there a way that defining the nested ejs-grid as this:
<ejs-grid #gridRef
[dataSource]='data'
[allowSorting]="true"
[childGrid]="childGrid"
[selectionSettings]="selectionOptions"
(created)="created($event)"
(dataBound)="dataBound($event)"
[enableVirtualization]=true
height=900>
<ng-template #detailTemplate let-data>
<div [hidden]="!data.isAttachmentDetailsVisible">Attachment details</div>
<div [hidden]="!data.isCommentDetailsVisible">Comment details</div>
<div [hidden]="!data.isLabelDetailsVisible">Label details</div>
<div [hidden]="!data.isAccountingDetailsVisible">Accounting details</div>
<ejs-grid #childGrid
I could set the internal ejs-grid as child of the outter ejs-grid?