public columns: GridColumn[] = [
{ field: 'DirectoryName', useAsLink: true, headerText: 'Directory Name', width: 120 },
{ field: 'CreatedOn', type: 'date', headerText: 'Created On', width: 70, valueAccessor: null
]; |
<e-columns>
<ng-template #template ngFor let-column [ngForOf]="columns" let-i="index">
<e-column *ngIf="column.useAsLink" [headerText]="column.headerText" [field]="column.field"
[width]="column.width"> // Use only defined columns definitions
</e-column>
. . . . . .
<e-column *ngIf="
column.type === 'date'
" [headerText]="column.headerText" [field]="column.field" [width]="column.width"
[valueAccessor]="column.valueAccessor" >
. . . . . .
</e-column>
</ng-template>
</e-columns>
|