ngx-datatable - 支持使用“columns”表属性定义列的行内编辑?

问题描述

我在 Angular 10 应用程序中使用了 ngx-data 表。表格列是通过 TypeScript 类中的数组属性定义的。

  <ngx-datatable #simpleListTable id="simpleList"
    class="material striped full-area-grid"
    [rows] = "rows$ | async"
    [columns]="columns"
    [sorts]="sorts"
    [scrollbarV]="true"
    [footerHeight]="50"
    [headerHeight]="50"
    [rowHeight]="40"
    [selected]="selected"
    selectionType="checkBox"
    [loadingIndicator]="isloading > 0"
    [scrollbarV]="true"
    [externalPaging]="true"
    [externalSorting]="true"
    [count]="totalRows$ | async"
    [offset]="pageNumber$ | async"
    (page)="setPage($event)"
    (sort)="onSort($event)"
    (select)="onSelect($event)"
  >
  </ngx-datatable>

    this.columns = [
      { width: 30,sortable: false,canAutoResize: false,draggable: false,resizeable: false,headerCheckBoxable: true,checkBoxable: true},{ name: 'Date',prop: TaskQueryBuilder.FIELD_SCHEDULED_FINISH,pipe: this.tablePipes.datePipe,minWidth: 250},{ name: 'Task name',prop: TaskQueryBuilder.FIELD_NAME,minWidth: 350 },{ name: 'Priority',prop: TaskQueryBuilder.FIELD_PRIORITY,pipe: this.tablePipes.priorityPipe,minWidth: 80 },{ name: 'Status',prop: TaskQueryBuilder.FIELD_STATE,minWidth: 140,pipe: this.tablePipes.statusPipe},{ name: 'Folder',prop: TaskQueryBuilder.FIELD_FOLDER_OBJECT,pipe: this.tablePipes.folderPipe,sortable: false},{ name: 'Category',prop: TaskQueryBuilder.FIELD_CATEGORY_OBJECT,pipe: this.tablePipes.categoryPipe,sortable: false}
      ];

我想使用表格内联编辑。是否可以通过列定义来定义它?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...