---
title: "selectRowIndexes(_:byExtendingSelection:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsruleeditor/selectrowindexes(_:byextendingselection:)"
---

# selectRowIndexes(_:byExtendingSelection:)

Sets in the receiver the indexes of rows that are selected.

## Declaration

```swift
func selectRowIndexes(_ indexes: IndexSet, byExtendingSelection extend: Bool)
```

## Parameters

- `indexes`: The indexes of rows in the receiver to select. important: Raises an NSRangeException if any index in rowIndexes is less than 0 or greater than or equal to the number of rows.
- `extend`: If doc://com.apple.documentation/documentation/Swift/false, the selected rows are specified by indexes. If doc://com.apple.documentation/documentation/Swift/true, the rows indicated by indexes are added to the collection of already selected rows, providing multiple selection.

## See Also

### Working with the Selection

- [selectedRowIndexes](appkit/nsruleeditor/selectedrowindexes.md)
