---
title: "outlineView(_:shouldEdit:item:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsoutlineviewdelegate/outlineview(_:shouldedit:item:)"
---

# outlineView(_:shouldEdit:item:)

Returns a Boolean value that indicates whether the outline view should allow editing of a given item in a given table column.

## Declaration

```swift
@MainActor optional func outlineView(_ outlineView: NSOutlineView, shouldEdit tableColumn: NSTableColumn?, item: Any) -> Bool
```

## Parameters

- `outlineView`: The outline view that sent the message.
- `tableColumn`: The table column.
- `item`: The item.

## Return Value

Return Value true to permit outlineView to edit the cell specified by tableColumn and item, false to deny permission.

## Discussion

Discussion If this method returns true, the cell may still not be editable—for example, if you have set up a custom NSTextFieldCell as a data cell, it must return true for isEditable to allow editing. The delegate can implement this method to disallow editing of specific cells.

## See Also

### Related Documentation

- [outlineView(_:setObjectValue:for:byItem:)](appkit/nsoutlineviewdatasource/outlineview(_:setobjectvalue:for:byitem:).md)
