<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTableView/allowsColumnSelection",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTableView(py)allowsColumnSelection"
  },
  "title" : "allowsColumnSelection"
}
-->

# allowsColumnSelection

A Boolean value indicating whether the table view allows the user to select columns by clicking their headers.

```
var allowsColumnSelection: Bool { get set }
```

## Discussion

The default is <doc://com.apple.documentation/documentation/Swift/false>, which prevents the user from selecting columns (if you create the table view in Interface Builder, the default value is <doc://com.apple.documentation/documentation/Swift/true>). You can select columns programmatically regardless of this setting.

## See Also

[`selectColumn:byExtendingSelection:`](/documentation/AppKit/NSTableView/selectColumn:byExtendingSelection:)

Selects the column at the specified index, optionally extending any existing selection.



---

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)