<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSOutlineViewDelegate/outlineView(_:shouldEdit:item:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSOutlineViewDelegate(im)outlineView:shouldEditTableColumn:item:"
  },
  "title" : "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.

```
@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

<doc://com.apple.documentation/documentation/Swift/true> to permit `outlineView` to edit the cell specified by `tableColumn` and `item`, <doc://com.apple.documentation/documentation/Swift/false> to deny permission.

## Discussion

If this method returns <doc://com.apple.documentation/documentation/Swift/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 <doc://com.apple.documentation/documentation/Swift/true> for `isEditable` to allow editing.

The delegate can implement this method to disallow editing of specific cells.

## See Also

[`func outlineView(NSOutlineView, setObjectValue: Any?, for: NSTableColumn?, byItem: Any?)`](/documentation/AppKit/NSOutlineViewDataSource/outlineView(_:setObjectValue:for:byItem:))

Set the data object for a given item in a given column.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)