Ag-grid行拖动在angular 7中不起作用,我需要ag-grid企业版吗?

时间:2019-07-30 22:47:43

标签: angular7 ag-grid

我尝试使用ag-grid在angular 7中实现行拖动功能,但它不起作用,是否需要ag-grid企业版?

我也分享了我的农业网格定义和专栏。

<ag-grid-angular
  #agGrid
  style="width: 100%; height: 400px;"
  id="myGrid"
  class="ag-angle"
  [columnDefs]="columnDefs"
  [deltaRowDataMode]="true"
  [defaultColDef]="defaultColDef"
  [animateRows]="true"
  [getRowNodeId]="getRowNodeId"
  [rowData]="rowData"
  (sortChanged)="onSortChanged($event)"
  (filterChanged)="onFilterChanged($event)"
  (rowDragMove)="onRowDragMove($event)"
  (gridReady)="onGridReady($event)"
></ag-grid-angular>

列定义

this.columnDefs = [
  {
    field: "athlete",
    rowDrag: true
  },
  { field: "country" },
  { field: "year" },
  { field: "date" },
  { field: "sport" },
  { field: "gold" },
  { field: "silver" },
  { field: "bronze" }
];
this.defaultColDef = {
  width: 150,
  sortable: true,
  filter: true
};

它没有显示要拖动列的图标

0 个答案:

没有答案