Setting focus when you add a node- DHTMLXGridTree


How do we set focus to a tree grid node, ni dhtmlxtree we have tree.setFocus(rowid), my requirement here is

I am adding a node in the grid tree, once i add that node, i need to set focus on that node, or highlight it.

Sample code




The thing is when i click on an highlighted item and select “Add new node " in my context menu”, i just cant get the selected rowid

for the selected item, not sure why, is there another way to set focus on a selected node in a grid tree, Please help!!

You can use
grid.showRow(id) … ct_showrow