问题描述
我在 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 (将#修改为@)