---
title: "setDropRow(_:dropOperation:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstableview/setdroprow(_:dropoperation:)"
---

# setDropRow(_:dropOperation:)

Retargets the proposed drop operation.

## Declaration

```swift
func setDropRow(_ row: Int, dropOperation: NSTableView.DropOperation)
```

## Parameters

- `row`: The target row index.
- `dropOperation`: The drop operation. Supported values are specified by doc://com.apple.appkit/documentation/AppKit/NSTableView/DropOperation.

## Discussion

Discussion For example, to specify a drop on the second row, specify row as 1, and operation as NSTableViewDropOn. To specify a drop below the last row, specify row as [self numberOfRows] and operation as NSTableViewDropAbove. Passing a value of –1 for row and NSTableViewDropOn as the operation causes the entire table view to be highlighted rather than a specific row. This is useful if the data displayed by the table view does not allow the user to drop items at a specific row location.

## See Also

### Dragging

- [dragImageForRows(with:tableColumns:event:offset:)](appkit/nstableview/dragimageforrows(with:tablecolumns:event:offset:).md)
- [canDragRows(with:at:)](appkit/nstableview/candragrows(with:at:).md)
- [setDraggingSourceOperationMask(_:forLocal:)](appkit/nstableview/setdraggingsourceoperationmask(_:forlocal:).md)
- [verticalMotionCanBeginDrag](appkit/nstableview/verticalmotioncanbegindrag.md)
- [draggingDestinationFeedbackStyle](appkit/nstableview/draggingdestinationfeedbackstyle-swift.property.md)
