Hi Guys
I’d like users to be able to add new nodes to a tree, the process is they click the + button, an empty node is added and then the “Edit” is automatically activated. The issue I have is, I’m not sure how programmatically fire the Edit on a tree node, I thought it would be something like this -
var clickAddCategory = function() {
var tree = $$("category_tree");
var row_id = tree.add({}, 0, tree.getSelectedId());
tree.editRow(row_id);
}
The node gets added ok, but the edit does not trigger. Any pointers on where I’m going wrong?
Also, what would be the correct method of aborted the new node, for example if the user pressed escape or click off the node without entering a value, I’d like it just to disappear and stop the Savefrom triggering.
Thanks