---
title: "subrowIndexes(forRow:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsruleeditor/subrowindexes(forrow:)"
---

# subrowIndexes(forRow:)

Returns the immediate subrows of a given row.

## Declaration

```swift
func subrowIndexes(forRow rowIndex: Int) -> IndexSet
```

## Parameters

- `rowIndex`: The index of a row in the receiver, or -1 to get the top-level rows. important: Raises an NSRangeException if rowIndex is less than -1 or greater than or equal to the number of rows.

## Return Value

Return Value The immediate subrows of the row at rowIndex.

## Discussion

Discussion Rows are numbered starting at 0.

## See Also

### Obtaining Row Information

- [numberOfRows](appkit/nsruleeditor/numberofrows.md)
- [parentRow(forRow:)](appkit/nsruleeditor/parentrow(forrow:).md)
- [row(forDisplayValue:)](appkit/nsruleeditor/row(fordisplayvalue:).md)
- [rowType(forRow:)](appkit/nsruleeditor/rowtype(forrow:).md)
- [NSRuleEditor.RowType](appkit/nsruleeditor/rowtype.md)
