javascript - auto select the parent after deleting a selected node -
i auto select parent after deleting selected node.
the following code use delete node , children if there any
var selectednode = treeview.select(); $(selectednode).children('.k-group').remove(); treeview.remove(selectednode);
how auto select parent node after delete?
try folllowing:
var selectednode = treeview.select(); var parentnode = treeview.parent(selectednode); $(selectednode).children('.k-group').remove(); // don't need line of code treeview.remove(selectednode); treeview.select(parentnode);
take through documentation too:
Comments
Post a Comment