aspnetcore-js-devexpress-dot-richedit-bfb29e96.md
A collection of the TableRow objects.
export class TableRowCollection extends TableBaseCollection<TableRow>
An object of this class can be accessed by the rows property.
Inserts a row above or below the specified row.
insert(
index: number,
below?: boolean
): TableRow
| Name | Type | Description |
|---|---|---|
| index | number |
The index of the row relative to which to insert a row.
| | below | boolean |
true to insert a row below the specified row; false to insert a row above the specified row.
|
| Type | Description |
|---|---|
| TableRow |
The newly inserted table row.
|
Note
The newly inserted row copies appearance settings from the row whose index you passed as the index parameter.
The following code snippet adds a new row above the first table row:
const subDocument = richEdit.selection.activeSubDocument;
const table = subDocument.tables.getByIndex(0);
table.rows.insert(0, false);
Removes a row with the specified index from the table.
remove(
index: number
): void
| Name | Type | Description |
|---|---|---|
| index | number |
A row index in the collection.
|
Note
Once you remove all rows from a table, the component removes the table from the document.
The following code snippet removes the last row in the table:
const subDocument = richEdit.selection.activeSubDocument;
const table = subDocument.tables.getByIndex(0);
table.rows.remove(table.rows.count-1);