TreeGrid.addData

Hi,
I have a TreeGrid bound to a (Rest)dataSource using the parent link model.
I want interactivly build a tree with nodes and leafs stored in a database. Using TreeGrid.addData({..}), records are inserted into the tree at different positions. The primary key (id) is generated by a database sequence.

How can I get the rownum of the newly inserted record in the TreeGrid? I want to modify the new record by TreeGrid.startEditing(rownum).

Thanks you for help

Specify a callback method on your addData() call. The second parameter passed to that method is an array, element 0 of which is the object just added to the grid. You should be able to pass that object to your TreeGrid’s getRecordIndex() method to obtain the row number.