Posted 14 September 2017, 12:05 pm EST
Hello,
We are currently evaluating grid options in Angular 2. One required feature is a custom expandable detail view (master grid with child grids). We have implemented it successfully using the wj-flex-grid component and wjFlexGridDetail directive, however, there is one odd quirk in the behavior that we cannot figure out. When a detail row is expanded, it seems to pick and set a height that is relative to the number of child items, but never actually shows all of the child items. We would like for the detail row to always expand to the full height of the child grid and show all children, rather than requiring scrolling in the child grid.
Here is our code with column definitions omitted for brevity:
<wj-flex-grid [itemsSource]="masterList" [selectionMode]="'Row'" [style.height]="'100%'" [headersVisibility]="'Column'" #wjGrid> <ng-template wjFlexGridDetail #dp="wjFlexGridDetail" [detailVisibilityMode]="'Code'" let-item="item"> <wj-flex-grid [itemsSource]="item.children" [headersVisibility]="'Column'" [selectionMode]="'Row'" > <!-- child grid column definitions --> </wj-flex-grid> </ng-template> <!-- including this column def as it relates to the child grid appearance --> <wj-flex-grid-column [header]="" [binding]="" [width]="60" [isReadOnly]="true"> <ng-template wjFlexGridCellTemplate [cellType]="'Cell'" let-row="row" let-item="item"> <div *ngIf="dp?.isDetailAvailable(row)"> <div [ngClass]="dp.isDetailVisible(row) ? 'collapse' : 'expand'" (click)="dp.isDetailVisible(row) ? dp.hideDetail(row) : dp.showDetail(row, true)"> </div> </div> </ng-template> </wj-flex-grid-column> <!-- master grid column definitions --> </wj-flex-grid>