DHTMLX Docs & Samples Explorer

Adding/Removing Rows

Adding a new row is also simple in dhtmlxTreeGrid with the help of the following method:

        treegrid.addRow(new_id, text, ind);

The parameters here are responsible for the following:

  • new_id - id of the new row;
  • text - array|string of row labels, may be a comma separated list or an array;
  • ind - should be set to null;
  • parent_id - id of the parent row;
  • img - images url for this new row;
  • child(true|false) - child flag, optional.