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

# selectedColumn

The index of the last selected column (or the last column added to the selection).

```
var selectedColumn: Int { get }
```

## Discussion

When multiple columns are selected, this property contains only the index of the last one in the selection. If no column is selected, the value of this property is `-1`.

## See Also

[`selectedColumnEnumerator`](/documentation/AppKit/NSTableView/selectedColumnEnumerator)

This method has been deprecated.

[`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)