DHTMLX Docs & Samples Explorer

Index
dhtmlxgrid
API Methods

### addRow(new_id, text, ind)

Required library edition:
Required library file: dhtmlxgrid.js

add row to the grid

- new_id - row ID, must be unique
- text - row values, may be a comma separated list or an array
- ind - index of new row, optional, row added to the last position by default

By default new row will be added to the last position:

            var newId = (new Date()).valueOf();
            grid.addRow(newId,"");

The user can provide values of a new row as a comma-separated list or as an array:

          grid.addRow(newId,"text1,text2",1);
          //or
          grid.addRow(newId,["text1","text2"],2);

See also: addRowFromClipboard, deleteRow