# TableRowCollection Object

> Contains all rows of a table in a Text Control document.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Object
- **Introduced:** 28.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > TableRowCollection Object
- **790 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablerowcollection/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablerowcollection/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablerowcollection/llms-full.txt

---

### Description

Contains all [rows](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablerow/llms-full.txt) of a table in a Text Control document.

### Syntax

```javascript
TableRowCollection
```

### Examples

The following example demonstrates `TableRowCollection` in a practical document-editing workflow. It contains all rows of a table in a Text Control document.

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

function inspectTableRowCollection(tableRows) {
    tableRows.getCanAdd(
        function(result) {
            if (result) {
                console.log("get can add is available.");
            } else {
                console.warn("get can add is not available in the current document state.");
            }
        },
        onTxError
    );
}
```

---

## In This Section

- [Javascript: TableRowCollection.add Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablerowcollection/add-method/llms-full.txt): Adds a count of rows before or after the first or last selected row.
- [Javascript: TableRowCollection.getCanAdd Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablerowcollection/getcanadd-method/llms-full.txt): Gets a value indicating whether a new row can be inserted at the current input position.
- [Javascript: TableRowCollection.getCanRemove Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablerowcollection/getcanremove-method/llms-full.txt): Gets a value indicating whether the selected rows can be removed. Rows can be removed, if either the current text input position is in a row, or if a part of a table is selected.
- [Javascript: TableRowCollection.getItem Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablerowcollection/getitem-method/llms-full.txt): Gets the table row at the current input position or the table row with the specified number.
- [Javascript: TableRowCollection.remove Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablerowcollection/remove-method/llms-full.txt): Removes the table row at the current text input position or all selected rows when a text selection exists.

---

## Nearby

- **Previous:** [Javascript: TableRow.setMinimumHeight Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablerow/setminimumheight-method/llms-full.txt)
- **Next:** [Javascript: TableRowCollection.add Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tablerowcollection/add-method/llms-full.txt)
