【发布时间】:2020-11-19 12:18:19
【问题描述】:
我想使用一些配置对象来显示一些嵌套数据。这里是demo code
可以看出,"customer.something" 是我需要访问的。现在可能有“N”级嵌套。网格使用 field='customer.something' 处理它。如何使用我的template 来做同样的事情
<e-column field='customer.something' headerText='Other' editType='dropdownedit' [edit]='editParams' width=120>
这是 HTML 文件:
<ejs-grid #Grid [dataSource]='data' allowSorting='true'>
<e-columns>
<ng-template #colTemplate ngFor let-column [ngForOf]="colList">
<e-column [field]='column.field' [headerText]='column.header' textAlign='Right' width=90>
<ng-template #template let-data>
{{data[column.field] | currency:'EUR'}} <-- want to fix this line
</ng-template>
</e-column>
</ng-template>
</e-columns>
</ejs-grid>
<!-- <ejs-grid #Grid [dataSource]='data' allowSorting='true'>
<e-columns>
<e-column field='price' isPrimaryKey='true' headerText='Price' textAlign='Right' width=90></e-column>
<e-column field='customer.something' headerText='Other' editType='dropdownedit' [edit]='editParams' width=120>
</e-column>
</e-columns>
</ejs-grid> -->
【问题讨论】:
标签: javascript angular typescript ej2-syncfusion