Select node value on renaming


I would like to know if it’s possible to select a node value when I dbl click on it ? In this case I didn’t have to make a ctrl+A to erase my old value’s node name.

In jquery this code able to responds to my issue : $(this).select();
I don’t know how can I use this function with the dhtmlxTree.


Here is your approach:

tree.attachEvent("onEdit",function(state,id,tree,value){ if(state==1){ var inp = this._editCell.span.firstChild;; } if (state == 2){ if (value == "" || value == " "){ alert('Please, type the name of item'); return false; } } return true })


Thanks it works fine !

You are welcome!