Skip to main content

addRow()

Description

Adds a new row into the spreadsheet

info

The method finds the specified cell, selects it, moves the row where the cell is located one cell below and adds an empty row instead.

Usage

addRow(cell: string): void;

Parameters

  • cell - (required) the id of a cell that contains the id of a row that should be added

Example

const spreadsheet = new dhx.Spreadsheet("spreadsheet", {});
spreadsheet.parse(data);

// adds an empty second row
spreadsheet.addRow("G2");

Related articles: Work with Spreadsheet