---
title: "tableView(_:validateDrop:proposedRow:proposedDropOperation:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstableviewdatasource/tableview(_:validatedrop:proposedrow:proposeddropoperation:)"
---

# tableView(_:validateDrop:proposedRow:proposedDropOperation:)

Used by aTableView to determine a valid drop target.

## Declaration

```swift
@MainActor optional func tableView(_ tableView: NSTableView, validateDrop info: any NSDraggingInfo, proposedRow row: Int, proposedDropOperation dropOperation: NSTableView.DropOperation) -> NSDragOperation
```

## Parameters

- `tableView`: The table view that sent the message.
- `info`: An object that contains more information about this dragging operation.
- `row`: The index of the proposed target row.
- `dropOperation`: The type of dragging operation proposed.

## Return Value

Return Value The dragging operation the data source will perform.

## Discussion

Discussion The data source may retarget a drop by calling setDropRow(_:dropOperation:) and returning something other than NSDragOperationNone. A data source might retarget for various reasons, such as to provide better visual feedback when inserting into a sorted position. To propose a drop on the second row, row would be 2 and operation would be NSTableViewDropOn. To propose a drop below the last row, row would be [aTableView numberOfRows] and operation would be NSTableViewDropAbove.

## See Also

### Drag and Drop

- [Supporting Table View Drag and Drop Through File Promises](appkit/supporting-table-view-drag-and-drop-through-file-promises.md)
- [tableView(_:acceptDrop:row:dropOperation:)](appkit/nstableviewdatasource/tableview(_:acceptdrop:row:dropoperation:).md)
- [tableView(_:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWith:)](appkit/nstableviewdatasource/tableview(_:namesofpromisedfilesdroppedatdestination:fordraggedrowswith:).md)
- [tableView(_:writeRowsWith:to:)](appkit/nstableviewdatasource/tableview(_:writerowswith:to:).md)
- [tableView(_:draggingSession:willBeginAt:forRowIndexes:)](appkit/nstableviewdatasource/tableview(_:draggingsession:willbeginat:forrowindexes:).md)
- [tableView(_:updateDraggingItemsForDrag:)](appkit/nstableviewdatasource/tableview(_:updatedraggingitemsfordrag:).md)
- [tableView(_:draggingSession:endedAt:operation:)](appkit/nstableviewdatasource/tableview(_:draggingsession:endedat:operation:).md)
