NodeEditing: function(sender, args);
sender. Event source.
args. Information on the event. Available arguments: Node - edited node, Column - column where the node is edited.
The NodeEditing event occurs in the process of editing a value in a table cell.
This event is relevant if the TreeList.EnableEdit property is set to true.
To switch to the edit mode, click desired cell twice. A small time interval must pass between the first and the second click.
To execute this example, the page must contain the TreeList component named treeListSett (see Example of Creating the TreeList Component). The TreeList.EnableEdit property must be set to True. Add handlers for the NodeEditing, NodeEditCanceled and NodeEdited events:
//on switching to the edit mode
treeListSett.NodeEditing.add(function (sender, args)
{
console.log("before: " + args.Node.getText())
});
//after the node name is changed
treeListSett.NodeEdited.add(function (sender, args)
{
console.log("after: " + args.Node.getText())
});
//if no changes have been made and the user has quit the edit mode
treeListSett.NodeEditCanceled.add(function (sender, args)
{
console.log("Column: " + args.Column) + "with the ESC key: " + args.Esc
});
After executing this example on switching to edit mode the browser console shows the text: before: <Node name>.
After the user exits the edit mode, if any changes have been made, the browser console shows the following text: after: <Modified node name>.
After the user exits the edit mode, if any changes have been made, the browser console shows the following text: Column: <Number of column data of which is edited> With the ESC key: <true(if the user exited the edit mode using the ESC key)/false(if the user quit the edit mode by clicking on a space outside the edited cell)>.
See also: