# Javascript: Table.rows Property

> Gets a collection of all rows the table consists of.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: Table.rows Property
- **318 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/table/rows-property/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/table/rows-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/table/rows-property/llms-full.txt

---

### Description

Gets a collection of all rows the table consists of.

### Syntax

```javascript
<TableRowCollection> Table.rows
```

### Examples

The following example demonstrates `Table.rows` in a practical document-editing workflow. It gets a collection of all rows the table consists of.

```javascript
function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.textParts.getMainText(function(mainText) {
    const tables = mainText.tables;
    tables.getItem(function(table) {
        if (!table) {
            console.warn("No table is available at the current input position.");
            return;
        }
    
        table.rows.getCount(function(count) {
            console.log("rows count:", count);
        }, onTxError);
    }, onTxError);
}, onTxError);
```

### Limitations

Read Only.

---

## Nearby

- **Previous:** [Javascript: Table.nestedTables Property](https://docs.textcontrol.com/ds-server/reference/javascript/table/nestedtables-property/llms-full.txt)
- **Next:** [Javascript: Table.select Method](https://docs.textcontrol.com/ds-server/reference/javascript/table/select-method/llms-full.txt)
