Categories | Question details Back To List | ||
the method setOnEditHandler on dhtmlXTree i want to rename a node on the doubleclick event. i use in my code the tree.enableItemEditor(true); and the setOnEditHandler(m_func) but the last one not existing in the dhtmlXTree_ed.js since the setOnEditHandler is deprecated i try to use the attachEvent("onEdit",func); but an error is generated on my .jsp ("..property or method not supported by object.."). what i may use to reneme the items in the tree?? thankyou Answer posted on Oct 30, 2007 09:11 Which version of tree do you use? The attachEvent available starting from dhtmlxTree 1.5 and may not be available in older versions - you need to use setOnEditHandler with older version ( meanwhile it still operable with latest code as well, but just not recomended to be used ) tree.enableItemEditor(true); tree.attachEvent("onEdit",function(){ //any code here return true; }) Actually to make item editable on dbl click you need just next two lines tree.enableItemEditor(true); tree.setEditStartAction(false,true); |