我尝试使用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
};
它没有显示要拖动列的图标