<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTableColumn/dataCell(forRow:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTableColumn(im)dataCellForRow:"
  },
  "title" : "dataCell(forRow:)"
}
-->

# dataCell(forRow:)

Returns the cell object used to display values in the specified row of the table column.

```
func dataCell(forRow row: Int) -> Any
```

## Parameters

`row`

The table column row.

## Return Value

The data cell object.

## Discussion

Returns the [`NSCell`](/documentation/AppKit/NSCell) object used by the table view to draw values for the receiver. The table view calls this method when drawing the row, so you shouldn’t need to call it directly. By default, this method just accesses [`dataCell`](/documentation/AppKit/NSTableColumn/dataCell).

To enable per-row customization of the cell used by the table column, you can override this method or use the `NSTableViewDelegate` method [`tableView(_:dataCellFor:row:)`](/documentation/AppKit/NSTableViewDelegate/tableView(_:dataCellFor:row:)). In both cases, the cell that’s returned should properly implement <doc://com.apple.documentation/documentation/Foundation/NSCopying/copy(with:)>, because the table view may copy the cell during certain operations.

Subclasses should be prepared for this method to be called with `row` equal to –1 in cases where no actual row is involved but the table view needs to get some generic cell information.

> Note:
> This method is only valid for cell-based table views.

---

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)