DHTMLX Docs & Samples Explorer

Index
dhtmlxtree

## onEdit Event

This event calls user-defined handlers (if there are any) and passes the following parameters:

- state - 0 = before starting of editing, 1 = after starting of editing, 2 = before editor's closing, 3 = after editor's closing;
- id - id of the edited item;
- tree - tree object;
- value - value of the editor (for stages 0 and 2).

               tree.attachEvent("onEdit", function(state,id,tree,value){});

For stages 0 and 2 this event returns: true - confirms opening|closing, false - denies opening|closing; text - edit value.