Check documentation for the latest version of dhtmlxSuite onEdit DHTMLX Docs

onEdit

fires on 4 different stages of the editing process (see the details)

boolean onEdit(number state,string|number id,object tree,string value);
statenumber0 - before editing starts, 1 - after editing starts, 2 - before editor's closing, 3 - after editor's closing
idstring|numberid of the edited item
treeobjectdhtmlXTreeObject instance of the tree
valuestringvalue of the editor (for stages 0 and 2)
booleantrue to allow editing/saving

Example

myTree.attachEvent("onEdit", function(state, id, tree, value){
    // your code here
});

Details

The event fires:

  • before editing starts (can be cancelled)
  • after editing ends
  • before editor's closing (can be cancelled)
  • after editor's closing
Back to top