嵌套的ngx-datatable

时间:2017-07-28 09:43:45

标签: angularjs typescript ngx-datatable

有人可以告诉我是否可以在另一个ngx-datatable中嵌套ngx-datatable例如我想在另一个数据表的列中添加一个单独的ngx-datatable。

以下是我的尝试

rows = [
    {
        "name": "Ethel Price",
        "gender": "female",
        "company": "Johnson, Johnson and Partners, LLC CMP DDC",
        "age": 22
    },
    {
        "name": "Claudine Neal",
        "gender": "female",
        "company": "Sealoud",
        "age": 55
    },
    {
        "name": "Beryl Rice",
        "gender": "female",
        "company": "Velity",
        "age": 67
    },
    {
        "name": "Wilder Gonzales",
        "gender": "male",
        "company": "Geekko"
    }] ;
<ngx-datatable class="table-bordered schedule-work-grid" [columnMode]="'force'" [rowHeight]="'auto'" [headerHeight]="150"
  *ngIf="locations.length > 0" [rows]="rows">
  <ngx-datatable-column name="Name"></ngx-datatable-column>
  <ngx-datatable-column>
    <template>
      <ngx-datatable class="table-bordered schedule-work-grid" [columnMode]="'force'" [rowHeight]="'auto'" [headerHeight]="150"
        *ngIf="locations.length > 0" [rows]="rows">
        <ngx-datatable-column name="Name"></ngx-datatable-column>
      </ngx-datatable>
    </template>
  </ngx-datatable-column>
  <ngx-datatable-column name="Age"></ngx-datatable-column>
</ngx-datatable>

有人可以确认嵌套数据表是否可行,如果可以,我该怎么做?

修改

我想创建以下结构

Structure to be created

据我所知,ngx-datatable目前不支持colspan和rowspan功能。请求您提供一些指示,以便我可以继续实施

0 个答案:

没有答案