2

有人可以让我知道嵌套 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>

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

编辑

我想创建以下结构

要创建的结构

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

4

0 回答 0