> For the complete documentation index, see [llms.txt](https://docs.wirebootstrap.com/wirebootstrap/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wirebootstrap.com/wirebootstrap/reference/wire.data/wire.data.datatable/rows.md).

# Rows

## Row Methods

| Name                            | Description                                                                                                                                                           |
| ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| distinctArray(column)           | Returns an array of distinct values in `column`.                                                                                                                      |
| insert(rows, first?)            | Inserts `rows` into a data table.  If `first` is passed in, the rows are inserted at the top of the `Rows` array.                                                     |
| join(table)                     | Joins a data table with a second table using an inner join.  Visit [DataTables Inner Joins](/wirebootstrap/working-with-datatables/joins.md#inner-join) for examples. |
| leftJoin(table)                 | Joins a data table with a second table using a left join.  Visit [DataTables Left Join](/wirebootstrap/working-with-datatables/joins.md#left-join) for examples.      |
| newRow                          | Returns a new rows with the same schema as the existing rows.  All values are set to `null`.                                                                          |
| replace(keyName, keyValue, row) | Replaces the row with the column value `keyValue` in the column name `keyName` with the `row` passed in.                                                              |

## Delete Row Methods

Use the following methods to `delete` rows from a data table.

| Name              | Description                                                                                                                                                             |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| eq(column, value) | Deletes the rows where the column `column` is `value`.                                                                                                                  |
| ne(column, value) | Deletes the rows where the column `column` does not equal`value`.                                                                                                       |
| filter(function)  | Deletes rows using a custom function. As the `function` is evaluated, it will receive the current row, index position, and the list of all rows as delegate parameters. |

The following deletes all rows where `UserName` is `apeters`.

```typescript
table.delete().eq("UserName", "apeters");
```

## Update Row Methods

Use the following methods to `update` the values of rows in a data table.

| Name             | Description                                                                                                                                                                                                           |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| update(column)   | Starts an update method chain for a `column` in a data table.                                                                                                                                                         |
| value(value)     | Sets the value of the column passed in the `update` method to `value`.                                                                                                                                                |
| filter(function) | Sets the value of the column passed in the `update` method using a custom function. As the `function` is evaluated, it will receive the current row, index position, and the list of all rows as delegate parameters. |

The first example below sets the `Active` column to `false` for all rows.  The second example sets the `Active` column to `false` only for `UserName` `apeters`.  It is otherwise set to `true`.

```typescript
table.update("Active").value(false);

...

table.update("Active").filter((row, index, rows) => {
    return (row.UserName == "apeters") ? false :  true;
});
```

Visit [DataTable Rows](/wirebootstrap/working-with-datatables/rows.md) for detailed examples of using row data table methods.
