---
title: "Row Reference"
framework: javascript
version: "36.1.0"
---

# Row Reference

Attributes and methods available on the `IRowNode<TData>` interface.

### Data

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `id` | `string \| undefined` |  |  | Unique ID for the node. Either provided by the application, or generated by the grid if not. |
| `sourceRowIndex` | `number` |  |  | The index of the row in the source rowData array including any updates via transactions. It does not change when sorting, filtering, grouping, pivoting or any other UI related operations. If this is a filler node (a visual row created by AG Grid in tree data or grouping) the value is set to `-1`. |
| `data` | [`TData \| undefined`](https://www.ag-grid.com/javascript-data-grid/typescript-generics/#row-data-tdata) |  |  | The data as provided by the application. Can be `undefined` when using row grouping or during grid initialisation. |
| `destroyed` | `boolean` |  |  | Indicates whether this row node has been removed from the grid. A row node is considered removed if it is no longer part of the row model. A removed row model instance will never be reused even if the same data item is added back to the grid. |
| `updateData` | `Function` |  |  | Updates the data on the `rowNode`. When this method is called, the grid refreshes the entire rendered row if it is displayed. |
| `setData` | `Function` |  |  | Replaces the data on the `rowNode`. When this method is called, the grid refreshes the entire rendered row if it is displayed. See [Client-Side Single Row Update](https://www.ag-grid.com/javascript-data-grid/data-update-single-row-cell/) for more information. |
| `setDataValue` | `Function` |  |  | Sets the value on the `rowNode` for the specified column and refreshes the rendered cell. In **Read Only** mode, this fires `onCellEditRequest` instead of writing directly. In **Pivot Mode**, pivot columns on leaf rows resolve to their underlying value column. The `eventSource` parameter controls how the value is written See [RowNode.setDataValue()](https://www.ag-grid.com/javascript-data-grid/cell-editing-batch/#rownodesetdatavalue) for more information. |
| `getDataValue` | `Function` |  |  | Returns the data value from the rowNode for the specified column. By default, returns committed data ignoring any pending edits. For group rows, returns aggregated values or the group key. For formula cells, returns the computed result. To get the displayed value (with formatting and value formatter applied), use `api.getCellValue()` instead. In Pivot Mode, pivot columns on leaf rows resolve to their underlying value column. The `from` parameter controls value resolution, including `'transformed'` to read the displayed [Show Values As](https://www.ag-grid.com/javascript-data-grid/aggregation-show-values-as/) value. See [RowNode.getDataValue()](https://www.ag-grid.com/javascript-data-grid/cell-editing-batch/#rownodegetdatavalue) for more information. |

### Display

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `rowIndex` | `number \| null` |  |  | The current row index. If the row is filtered out or in a collapsed group, this value is set to `null`. |
| `rowTop` | `number \| null` |  |  | The row top position in pixels. |
| `displayed` | `boolean` |  |  | This is `true` if it has a rowIndex assigned, otherwise `false`. |
| `isHovered` | `Function` |  |  | Returns: - `true` if the node is currently hovered. - `false` if the node is not hovered. |

### Events

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `addEventListener` | `Function` |  |  | Add an event listener. |
| `removeEventListener` | `Function` |  |  | Remove event listener. |

### Expand / Collapse

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `expanded` | `boolean` |  |  | `true` if group is expanded, otherwise `false`. |
| `isExpandable` | `Function` |  |  | Returns: - `true` if the node can be expanded, i.e it is a group or master row. - `false` if the node cannot be expanded. |
| `setExpanded` | `Function` |  |  | Set the expanded state of this rowNode. `expanded` - `true` to expand, `false` to collapse`sourceEvent` - Optional event that will be passed to the `rowGroupOpened` event.`forceSync` - By default rows are expanded asynchronously for best performance. Set to `true` if you need to interact with the expanded row immediately after this function. |

### Grouping

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `group` | `boolean \| undefined` |  |  | `true` if this node has children. - In case of grouping, this is `true` for group nodes. Group nodes are generated and do not have a data field. - In case of treeData, this is `true` for any kind of node that have children. Filler nodes or user provided nodes with children. |
| `groupData` | `{ [key: string]: any \| null } \| null` |  |  | If using row grouping, contains the group values for this group. |
| `aggData` | `any` |  |  | If using row grouping and aggregation, contains the aggregation data. Created via `Object.create(null)` to avoid prototype conflicts. |
| `key` | `string \| null` |  |  | The key value for this group. |
| `field` | `string \| null` |  |  | The field we are grouping on from our row data. |
| `rowGroupColumn` | [`Column \| null`](https://www.ag-grid.com/javascript-data-grid/column-object/) |  |  | The row group column used for this group. |
| `rowGroupIndex` | `number \| null` |  |  | If doing in-memory (client-side) grouping, this is the index of the group column this cell is for. This is always the same as the level, unless we are collapsing groups, i.e. `groupHideParentOfSingleChild=true`. |
| `footer` | `boolean \| undefined` |  |  | `true` if row is a footer. Footers have `group = true` and `footer = true`. |
| `parent` | [`IRowNode \| null`](https://www.ag-grid.com/javascript-data-grid/row-object/) |  |  | The parent node to this node, or empty if top level. |
| `level` | `number` |  |  | How many levels this node is from the top when grouping. |
| `uiLevel` | `number` |  |  | How many levels this node is from the top when grouping in the UI (only different to `parent` when `groupHideParentOfSingleChild=true`). |
| `allLeafChildren` | [`IRowNode[] \| null`](https://www.ag-grid.com/javascript-data-grid/row-object/) |  |  | All the row nodes that have user provided data below this node. Can be null if empty. This excludes: - filler nodes when using treeData and getDataPath - group nodes when using grouping - footer nodes |
| `childrenAfterGroup` | [`IRowNode[] \| null`](https://www.ag-grid.com/javascript-data-grid/row-object/) |  |  | Children of this group. `null` for leaf nodes, non-empty array for groups. Never an empty array. |
| `childrenAfterFilter` | [`IRowNode[] \| null`](https://www.ag-grid.com/javascript-data-grid/row-object/) |  |  | Filtered children of this group. `null` for leaf nodes. |
| `childrenAfterSort` | [`IRowNode[] \| null`](https://www.ag-grid.com/javascript-data-grid/row-object/) |  |  | Sorted children of this group after aggregation filtering. `null` for leaf nodes. |
| `allChildrenCount` | `number \| null` |  |  | Number of children and grand children. |
| `leafGroup` | `boolean \| undefined` |  |  | `true` if this node is a group and the group is the bottom level in the tree. |
| `sibling` | [`IRowNode`](https://www.ag-grid.com/javascript-data-grid/row-object/) |  |  | If using footers, reference to the footer node for this group. |
| `primaryRow` | [`IRowNode`](https://www.ag-grid.com/javascript-data-grid/row-object/) |  |  | The primary (canonical) row node, resolving footer and pinned sibling relationships. - If this is a **footer** row, returns its parent group row. - If this is a **manually pinned** row, returns the source row in the main viewport. - If both (pinned footer), follows both links to the primary group row. - Otherwise, returns `this`. |
| `depthFirstSearch` | `Function` |  |  | Perform a depth-first search of this node and its children. |
| `getAggregatedChildren` | `Function` |  |  | Returns children that contribute to the aggregation of this group RowNode. - For leaf groups (groups containing data rows): returns the data rows. With pivot columns, only rows matching the pivot keys are included. - For non-leaf groups (groups containing other groups): returns the child groups. - For leaf (non-group) RowNodes: returns an empty array. When `recursive` is `true`, traverses the full group hierarchy and returns all descendant leaf (data) rows instead of the immediate children. This creates a new array on each call. Use with care on large datasets as it visits every descendant node. **Note:** Only supported with the Client-Side Row Model. See [Retrieving Aggregated Children](https://www.ag-grid.com/javascript-data-grid/aggregation/#retrieving-aggregated-children) for more information. |

### Height

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `rowHeight` | `number \| null \| undefined` |  |  | The height, in pixels, of this row. |
| `setRowHeight` | `Function` |  |  | Sets the row height. Call if you want to change the height initially assigned to the row. After calling, you must call `api.onRowHeightChanged()` so the grid knows it needs to work out the placement of the rows. |

### Master Detail

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `master` | `boolean` |  |  | `true` if this row is a master row, part of master / detail (ie row can be expanded to show detail). |
| `detail` | `boolean \| undefined` |  |  | `true` if this row is a detail row, part of master / detail (ie child row of an expanded master row). |

### Pinned Rows

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `rowPinned` | `RowPinnedType` |  |  | Either `'top'` or `'bottom'` if row pinned, otherwise `undefined` or `null`. |
| `isRowPinned` | `Function` |  |  | Returns: - `true` if node is either pinned to the `top` or `bottom`. - `false` if the node isn't pinned. |

### Quick Filter

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `quickFilterAggregateText` | `string \| null` |  |  | If using quick filter, stores a string representation of the row for searching against. |
| `resetQuickFilterAggregateText` | `Function` |  |  | The first time `quickFilter` runs, the grid creates a one-off string representation of the row. This string is then used for the quick filter instead of hitting each column separately. When you edit, using grid editing, this string gets cleared down. However, if you edit without using grid editing, you need to clear this string down for the row to be updated with the new values. Otherwise, new values would not work with the `quickFilter`. |

### Selection

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `selectable` | `boolean` |  |  | Is this row selectable. |
| `setSelected` | `Function` |  |  | Select (or deselect) the node. `newValue` - `true` for selection, `false` for deselection.`clearSelection` - If selecting, then passing `true` will select the node exclusively (i.e. NOT do multi select). If doing deselection, `clearSelection` has no impact. |
| `isSelected` | `Function` |  |  | Returns: - `true` if node is selected. - `false` if the node isn't selected. - `undefined` if it's partially selected (a group where not all descendants are selected, and `groupSelects` is `'descendants'` or `'filteredDescendants'`). |

### Server Side Row Model

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `stub` | `boolean \| undefined` |  |  | Used by server-side row model. `true` if this row node is a stub. A stub is a placeholder row with loading icon while waiting from row to be loaded. |
| `failedLoad` | `boolean \| undefined` |  |  | Used by server side row model, `true` if this row node failed a load. |
| `getRoute` | `Function` |  |  | Returns the route of the row node. If the Row Node does not have a key (i.e it's a leaf row inside a row group) returns undefined See [Server-Side Model: Open by Default](https://www.ag-grid.com/javascript-data-grid/server-side-model-grouping/#open-by-default) for more information. |
