+
delete
Drag a row here to delete it
diff --git a/src/app/tree-grid/tree-grid-row-drag-base/tree-grid-row-drag-base.component.ts b/src/app/tree-grid/tree-grid-row-drag-base/tree-grid-row-drag-base.component.ts
index 5638743e04..2a777d698b 100644
--- a/src/app/tree-grid/tree-grid-row-drag-base/tree-grid-row-drag-base.component.ts
+++ b/src/app/tree-grid/tree-grid-row-drag-base/tree-grid-row-drag-base.component.ts
@@ -26,17 +26,16 @@ export class TreeGridRowDragBase {
}
public onDropAllowed(args: IDropDroppedEventArgs) {
- args.cancel = true;
const draggedRow: IgxTreeGridRowComponent = args.dragData;
draggedRow.delete();
}
public onEnterAllowed(args) {
- this.changeGhostIcon(args.drag.dragGhost, DragIcon.ALLOW);
+ this.changeGhostIcon(args.drag.ghostElement, DragIcon.ALLOW);
}
public onLeaveAllowed(args) {
- this.changeGhostIcon(args.drag.dragGhost, DragIcon.DEFAULT);
+ this.changeGhostIcon(args.drag.ghostElement, DragIcon.DEFAULT);
}
private changeGhostIcon(ghost, icon: string) {
diff --git a/src/app/tree-grid/tree-grid-row-drag/tree-grid-row-drag.component.html b/src/app/tree-grid/tree-grid-row-drag/tree-grid-row-drag.component.html
index 195867e3d7..f7c2260b8d 100644
--- a/src/app/tree-grid/tree-grid-row-drag/tree-grid-row-drag.component.html
+++ b/src/app/tree-grid/tree-grid-row-drag/tree-grid-row-drag.component.html
@@ -1,5 +1,5 @@
-
+
delete
Drag a row here to delete it
diff --git a/src/app/tree-grid/tree-grid-row-drag/tree-grid-row-drag.component.ts b/src/app/tree-grid/tree-grid-row-drag/tree-grid-row-drag.component.ts
index 8cf35f7e44..e1591794ac 100644
--- a/src/app/tree-grid/tree-grid-row-drag/tree-grid-row-drag.component.ts
+++ b/src/app/tree-grid/tree-grid-row-drag/tree-grid-row-drag.component.ts
@@ -26,17 +26,16 @@ export class TreeGridRowDrag {
}
public onDropAllowed(args: IDropDroppedEventArgs) {
- args.cancel = true;
const draggedRow: IgxTreeGridRowComponent = args.dragData;
draggedRow.delete();
}
public onEnterAllowed(args) {
- this.changeGhostIcon(args.drag.dragGhost, DragIcon.ALLOW);
+ this.changeGhostIcon(args.drag.ghostElement, DragIcon.ALLOW);
}
public onLeaveAllowed(args) {
- this.changeGhostIcon(args.drag.dragGhost, DragIcon.DEFAULT);
+ this.changeGhostIcon(args.drag.ghostElement, DragIcon.DEFAULT);
}
private changeGhostIcon(ghost, icon: string) {
diff --git a/src/app/tree-grid/tree-grid-row-reorder/tree-grid-row-reorder.component.html b/src/app/tree-grid/tree-grid-row-reorder/tree-grid-row-reorder.component.html
index 02e24aba74..0c15862b55 100644
--- a/src/app/tree-grid/tree-grid-row-reorder/tree-grid-row-reorder.component.html
+++ b/src/app/tree-grid/tree-grid-row-reorder/tree-grid-row-reorder.component.html
@@ -1,7 +1,7 @@
+ [primaryKey]="'ID'" (onRowDragStart)="rowDragStart($event)" (dropped)="dropInGrid($event)">
diff --git a/src/app/tree-grid/tree-grid-row-reorder/tree-grid-row-reorder.component.ts b/src/app/tree-grid/tree-grid-row-reorder/tree-grid-row-reorder.component.ts
index 88ab3b769c..d57a3c1e3b 100644
--- a/src/app/tree-grid/tree-grid-row-reorder/tree-grid-row-reorder.component.ts
+++ b/src/app/tree-grid/tree-grid-row-reorder/tree-grid-row-reorder.component.ts
@@ -24,7 +24,6 @@ export class TreeGridRowReorderComponent {
}
public dropInGrid(args: IDropDroppedEventArgs): void {
- args.cancel = true;
const draggedRow: IgxTreeGridRowComponent = args.dragData;
const event = args.originalEvent;
const cursorPosition: Point = { x: event.pageX, y: event.pageY };