---
title: "row(forItem:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsoutlineview/row(foritem:)"
---

# row(forItem:)

Returns the row associated with a given item.

## Declaration

```swift
func row(forItem item: Any?) -> Int
```

## Parameters

- `item`: An item in the receiver.

## Return Value

Return Value The row associated with item, or –1 if item is nil or cannot be found.

## See Also

### Converting Between Items and Rows

- [item(atRow:)](appkit/nsoutlineview/item(atrow:).md)
