---
title: "tableView(_:nextTypeSelectMatchFromRow:toRow:for:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstableviewdelegate/tableview(_:nexttypeselectmatchfromrow:torow:for:)"
---

# tableView(_:nextTypeSelectMatchFromRow:toRow:for:)

Asks the delegate for the row within the specified search range that matches the specified string.

## Declaration

```swift
@MainActor optional func tableView(_ tableView: NSTableView, nextTypeSelectMatchFromRow startRow: Int, toRow endRow: Int, for searchString: String) -> Int
```

## Parameters

- `tableView`: The table view that sent the message.
- `startRow`: The starting row of the search range.
- `endRow`: The ending row of the search range.
- `searchString`: A string containing the typed selection.

## Return Value

Return Value The first row in the range of startRow through endRow (excluding endRow itself) that matches selectionString. Return -1 if no match is found.

## Discussion

Discussion Use this method to control how type selection works in a table. (Implementation of this method isn’t required to support type selection.) Note that it’s possible for endRow to be less than startRow if the search will wrap.

## See Also

### Selecting rows

- [selectionShouldChange(in:)](appkit/nstableviewdelegate/selectionshouldchange(in:).md)
- [tableView(_:shouldSelectRow:)](appkit/nstableviewdelegate/tableview(_:shouldselectrow:).md)
- [tableView(_:selectionIndexesForProposedSelection:)](appkit/nstableviewdelegate/tableview(_:selectionindexesforproposedselection:).md)
- [tableView(_:shouldSelect:)](appkit/nstableviewdelegate/tableview(_:shouldselect:).md)
- [tableViewSelectionIsChanging(_:)](appkit/nstableviewdelegate/tableviewselectionischanging(_:).md)
- [tableViewSelectionDidChange(_:)](appkit/nstableviewdelegate/tableviewselectiondidchange(_:).md)
- [tableView(_:shouldTypeSelectFor:withCurrentSearch:)](appkit/nstableviewdelegate/tableview(_:shouldtypeselectfor:withcurrentsearch:).md)
- [tableView(_:typeSelectStringFor:row:)](appkit/nstableviewdelegate/tableview(_:typeselectstringfor:row:).md)
