Check documentation for the latest version of dhtmlxSuite addRowBefore DHTMLX Docs

addRowBefore

adds new row to treeGrid, before some other row

void addRowBefore(string|number new_id,array text,string|number sibl_id,string img,boolean child);
new_idstring|numbernew row id
textarrayan array of cell labels in a row
sibl_idstring|numberid of row, related to which new one will be added
imgstringimg url for new row
childbooleanchild flag [optional]

Available only in PRO Edition

Example

myTreeGrid.addRowBefore("new_id",["col1_value","col2_value","col3_value"],"row_id",
"folder.img",true);

Back to top